Skip to content

Conversation

@remco1271
Copy link
Contributor

When signing on Linux with a files with spaces in them will fail to sign.
The output:

[01:04:28 INF] Code-signed 118/171 files
[01:04:29 INF] Code-signed 119/171 files
jsign: The file /tmp/velopack/temp.1/PreprocessPackDirWin/Bus couldn't be found

Verbose output:

[01:55:53 DBG] Signing command failed - 
    /bin/bash -c "java -jar /workspace/local/monitor/jsign.jar --storetype TRUSTEDSIGNING --keystore https://weu.codesigning.azure.net --storepass <key removed> --alias Fischer/remco "/tmp/velopack/temp.1/PreprocessPackDirWin/PcanView.exe" "/tmp/velopack/temp.1/PreprocessPackDirWin/Bus Monitor.exe" "/tmp/velopack/temp.1/PreprocessPackDirWin/Squirrel.exe" "/tmp/velopack/temp.1/PreprocessPackDirWin/Bus Monitor_ExecutionStub.exe" >> \"/tmp/velopack/temp.2\" 2>&1"

Updated filesToSignStr to use double quotes on Windows and single quotes on other platforms. This ensures file paths with spaces or special characters are handled correctly during code signing across different operating systems.
Refactored file path and argument handling for Linux code signing.
Removed the double escape by previous commit
File paths are now wrapped in single quotes, and a new EscapeForBash
method ensures special characters in signing arguments are properly
escaped for bash. Removed redundant manual escaping in
RunSigningCommand, relying on earlier escaping for command safety.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant