-
-
Notifications
You must be signed in to change notification settings - Fork 746
Fix single instance broken #994
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
Conversation
89c5543 to
30393f1
Compare
|
@FlorianRappl I tested it with my changes and it works now (both enabling + disabling). Not exactly sure why you changed it to "yes" in the original commit -maybe you can clarify? Thanks 😀 Tested by running the following command in the published output dir: Manipulate "package.json" and configure "singleInstance" to either "true" or "false" Run app twice via:
Previously:App always runs twice. |
pr-comment: Run #13
🎉 All tests passed!Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
30393f1 to
969332c
Compare
969332c to
944a68a
Compare
|
Yeah this I think is an artifact from the migration to pure .NET, i.e., no more serialization here. I think it might even make sense to remove the As far the issue - I think removal of the deserialization and comparing to |
|
The original mistake is in package.template.json: "license": "$(License)",
"executable": "$(TargetName)",
"singleInstance": "$(ElectronSingleInstance)",
"homepage": "$(ProjectUrl)",
"splashscreen": {
"imageFile": "$(ElectronSplashScreen)"
},The value should not be quoted. And then in <TemplateProperty Include="ElectronSingleInstance" Value="$(ElectronSingleInstance)" />needs to be changed to this: <TemplateProperty Include="ElectronSingleInstance" Value="$(ElectronSingleInstance.ToLower())" /> |
|
Thanks a lot for the PR and bringing this to attention. This PR is close, but actually, that value should be a boolean in the first place, that's why #994 is a better way from my point of view. |
|
Closed in favour of #996 |

I was debugging why my electron app does not respect the singleInstance property and found out that commit 688d6d8 regressed the single instance behaviour.
Problem: Commit 688d6d8 changed the check to == 'yes' but the configuration uses
true.