feat: Support '"' quoting for custom signing tool#10589
feat: Support '"' quoting for custom signing tool#10589anatawa12 wants to merge 2 commits intotauri-apps:devfrom
Conversation
| } | ||
| (State::Idle, '"') => { | ||
| state = State::Quoted; | ||
| } |
There was a problem hiding this comment.
It might be good to reserve some symbols for future extension
Package Changes Through fad62e7There are 7 changes which include tauri-build with prepatch, tauri-codegen with prerelease, tauri-utils with prerelease, tauri-bundler with prerelease, tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri with prerelease Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
|
I've fixed format error. sorry |
lucasfernog
left a comment
There was a problem hiding this comment.
looks good to me, anything against this change @amrbashir ?
| (State::Unquoted, '"') => { | ||
| return Err(anyhow::anyhow!("custom signing command contains an unclosed quote").into()); |
There was a problem hiding this comment.
We shouldn't error here imo, and just continue parsing
There was a problem hiding this comment.
I think it's a little unclear that foo"bar baz should be treated as foo bar baz, foo"bar baz, or foo"bar baz so I made this error. Which should I choose?
There was a problem hiding this comment.
but if we go with the object solution (which we should), this doesn't matter
There was a problem hiding this comment.
I mean your decision is not clear and reasonable enough I think.
For example, with command prompt (cmd.exe), foo"bar baz become foobar baz.
(Sorry I forget to list this up in the previous example list. foo"bar baz is mistake of foobar baz)
Anyway I made PR for object solution so this discussion might be useless.
There was a problem hiding this comment.
thanks, will close this PR then and move discussion there
| state = State::Idle; | ||
| } | ||
| (State::QuotedJustAfterQuote, _) => { | ||
| return Err(anyhow::anyhow!("custom signing command contains an unclosed quote").into()); |
| result.push(buffer); | ||
| } | ||
| State::Quoted => { | ||
| return Err(anyhow::anyhow!("custom signing command contains an unclosed quote").into()); |
|
I wonder if it is better to change the command into an object rather than introduce custom parsing logic {
"customSignCommand": {
"cmd": "program with space.exe",
"args": ["list", "of", "args"],
}
} |
|
I think it's better to use object form but I have no Idea how should I implement that since crate for bundler and config is diffdrent crate Shuld I create struct on both config and bundler? |
yup, two configs, there is similar objects you can take inspiration from like |
Add support for '"' quoting in custom signing tool
#10583 (comment)