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
Regression in postinstall scripts #8166
Comments
Hmmm the post install script never changed, the only change was adding If a postinstall script was |
I am trying to access files that are placed inside the installed app folder. For that I access
The thing is, it used to be |
I still think it's expected behavior from my quick research
My guess is that adding |
Does it mean that all the previous versions were working incorrectly, passing |
That's my current hypothesis. If you look through the PR code diff, there's nothing setting the path or changing the executable script itself. Rather, it's simply scanning the install scripts directory, identifying any that are preinstall/postinstall and adding that file entry into the Info.plist. It doesn't modify the pkg scripts' arguments itself. |
What is the manual step for generating .pkg file? If I try
The bug is not necessarily introduced by this PR, it could just be revealed now. |
Ok, I think I found the real issue. It actually runs the postinstall script twice. Once for the application and once for the component specified in plist file. This seems like a bug to me. |
Excellent debugging, thank you! I'll take a look when I have a chance, potentially this week if I can find time after work. |
@MaximKalinin
|
@MaximKalinin |
Scripts were working fine for me, you can see it in the test repository: https://github.com/MaximKalinin/electron-builder-test. |
Postinstall script in pkg target receives wrong
$2
argument.There is a regression in electron-builder or one of its dependencies that was not documented. It first appeared in 24.13.2 version and is still present in the latest version (24.13.3). Specifically, I believe it is related to this modification.
Here is a minimal repository that reproduces the issue: https://github.com/MaximKalinin/electron-builder-test
Steps to reproduce:
Expected result: the output of the file is
/Applications
Actual result: the output of the file is
/Applications/electron-builder-test.app
The text was updated successfully, but these errors were encountered: