Skip to content

fix: sanitize basename for name starting with a number #245

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheGuyWithoutH
Copy link

This PR solves the issue encountered when using an App name starting with a number with electron/notarize.

The call to codesign is now sanitized to be interpreted as a filename and not a process.

This issue was references in #237

@TheGuyWithoutH TheGuyWithoutH requested a review from a team as a code owner June 16, 2025 00:34
@TheGuyWithoutH
Copy link
Author

@davej in the meantime it is possible to solve the issue by applying a pnpm patch

Copy link
Member

@BlackHole1 BlackHole1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM.

It seems that this can also fix #193.

@BlackHole1
Copy link
Member

Can you fix the issue of the test failure?

@TheGuyWithoutH
Copy link
Author

Hi @BlackHole1 ! I fixed the linter issue!

@BlackHole1 BlackHole1 requested a review from a team June 18, 2025 02:50
@TheGuyWithoutH
Copy link
Author

Hi @BlackHole1 ! Do you have any news for the PR?

});
const result = await spawn(
'codesign',
['-dv', '-vvvv', '--deep', `./${path.basename(opts.appPath)}`],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why basename relative to root? Why not path.resolve(opts.appPath)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly have no idea, it was a previous change I kept. My contribution is on escaping the command argument.

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.

3 participants