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

A couple of issues when using DEBUG=electron-osx-sign* #197

Open
chrisckc opened this issue Jun 11, 2019 · 1 comment
Open

A couple of issues when using DEBUG=electron-osx-sign* #197

chrisckc opened this issue Jun 11, 2019 · 1 comment
Labels

Comments

@chrisckc
Copy link

chrisckc commented Jun 11, 2019

OS: MacOS 10.14.4
XCode: 10.2

When using DEBUG=electron-osx-sign* to debug code signing, i found a couple of issues:

First, if the path to the file to be signed contains "/p" in the path, the path shown in the logging output is messed up due to a function which removes password from the command to be executed:

https://github.com/electron-userland/electron-osx-sign/blob/b6fcaa570cf306771b3af9a8394ccd7037a74b25/util.js#L32-L36

The regex in the above function is matching paths such as /node_modules/puppeteer/
Maybe it should be modified to only match " /p" (/p with preceding space) like this:
/(-P |pass:|^.\/p|-pass )([^ ]+)/

Second issue, likely related to the codesign tool or child.execFile is that for some reason the stdout from the command executed by child.ExecFile is appearing on stderr instead

https://github.com/electron-userland/electron-osx-sign/blob/b6fcaa570cf306771b3af9a8394ccd7037a74b25/util.js#L44-L56

To see this happening add a line such as this just before the resolve(stdout)

debuglog('Result: err: ', err, '\n', '> Stdout:', stdout, '\n', '> Stderr:', stderr)

A successful codesign results in the output appearing on stderr

Just thought it was worth mentioning as being able to see the path correctly when it contains "/p" and also the codesign output is useful.

@sethlu sethlu added the question label Sep 9, 2019
@sethlu sethlu added bug and removed question labels Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@chrisckc @sethlu and others