Relevant area(s)
WinGet CLI
Relevant command(s)
No response
Brief description of your issue
WingetSourceCreator cannot handle spaces in certificate path. Root cause is within the method SignFile in WingetSourceCreator\Helpers.cs
You need to change this:
string command = $"sign /a /fd sha256 /f {signature.CertFile} ";
to this:
string command = $"sign /a /fd sha256 /f \"{signature.CertFile}\" ";
You can implement #4948 while you are on it.
Steps to reproduce
Build solution. You might want to apply fix from #4181 so you can actually work with the IndexCreationTool.
Run the IndexCreationTool with Signature.CertFile path having an empty space somewhere in between.
When using path e.g "D:/Jenkins/WrkDir/workspace/Winget Builder/Build Winget Package/signing_cert.pfx" you will be greeted with "SignTool Error: File not found: D:/Jenkins/WrkDir/workspace/Winget"
Expected behavior
Being able to deal with empty spaces in a path
Actual behavior
When using path e.g "D:/Jenkins/WrkDir/workspace/Winget Builder/Build Winget Package/signing_cert.pfx" you will be greeted with "SignTool Error: File not found: D:/Jenkins/WrkDir/workspace/Winget"
Environment
Relevant area(s)
WinGet CLI
Relevant command(s)
No response
Brief description of your issue
WingetSourceCreator cannot handle spaces in certificate path. Root cause is within the method SignFile in WingetSourceCreator\Helpers.cs
You need to change this:
string command = $"sign /a /fd sha256 /f {signature.CertFile} ";to this:
string command = $"sign /a /fd sha256 /f \"{signature.CertFile}\" ";You can implement #4948 while you are on it.
Steps to reproduce
Build solution. You might want to apply fix from #4181 so you can actually work with the IndexCreationTool.
Run the IndexCreationTool with Signature.CertFile path having an empty space somewhere in between.
When using path e.g "D:/Jenkins/WrkDir/workspace/Winget Builder/Build Winget Package/signing_cert.pfx" you will be greeted with "SignTool Error: File not found: D:/Jenkins/WrkDir/workspace/Winget"
Expected behavior
Being able to deal with empty spaces in a path
Actual behavior
When using path e.g "D:/Jenkins/WrkDir/workspace/Winget Builder/Build Winget Package/signing_cert.pfx" you will be greeted with "SignTool Error: File not found: D:/Jenkins/WrkDir/workspace/Winget"
Environment