Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vpk pack: emit signtool output immediately rather than capturing and printing it at the end #81

Open
Trinitek opened this issue Apr 11, 2024 · 1 comment
Labels
enhancement New feature or request os:windows

Comments

@Trinitek
Copy link
Contributor

I'm asking for a better debugging experience when working with signtool in a non-interactive CI pipeline.

I'm invoking signtool with a dlib which makes network calls. As part of this, it needs login credentials. There are a handful of ways it can accept non-interactive credentials, but when I forget to specify them, the behavior of vpk pack makes it difficult to see what's going on.

The dlib is prompting me for interactive credentials, but because vpk captures stdout, this prompt is never emitted and the pack process hangs indefinitely with no visual indication of what's happening. I need an immediate way to see this.

@caesay
Copy link
Member

caesay commented Apr 11, 2024

I would love this, but unfortunately, I don't think this will be possible at the moment. vpk actually is not capable of capturing signtool output at all, it runs signtool as a new process under cmd.exe and redirects the stdout to a file - which is then read back in after the process exits. The reason for doing this, is when we migrated vpk into a dotnet tool, it broke signtool.exe's ability to open HSM password prompts if it's console is connected to vpk in any way. My best guess is it's something related to how dotnet launches tools.

https://github.com/velopack/velopack/blob/develop/src/Velopack.Packaging.Windows/CodeSign.cs#L104

We'd need to find a different way of launching signtool.exe which does not rely on piping stdout to a file, and also preserves signtool HSM functionality.

@caesay caesay added enhancement New feature or request os:windows labels Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request os:windows
Projects
None yet
Development

No branches or pull requests

2 participants