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

Fix elevation prompt on Windows #50

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Fix elevation prompt on Windows #50

merged 1 commit into from
Dec 1, 2023

Conversation

AdrasteonDev
Copy link
Contributor

This pull request is related to #42.

I've added elevation at the start of a command execution (when elevation is required), to rerun the command with administrator rights on Windows (except in debugging, to allow the use of breakpoints).

As AddonsInstallCommand only needs to be elevated if an addon has a "symlink" source in the addons file, I've added elevation only if at least one addon has a "symlink" source.

For information, I've added two methods (FileContains in FileClient and AddonsFileContainsSymlinkAddons in AddonsFileRepo) without adding tests for them for the moment. I'll try to add them this week-end.

Let me know if you have any questions/remarks. I've checked the option to allow edits, so feel free to add commits directly to the forked repo if needed.

@jolexxa
Copy link
Member

jolexxa commented Dec 1, 2023

Wow, thanks! :D Since you've done the hard part, I'd like to take a pass at this and see if I can move some stuff around to make this a little bit simpler and easier to test.

@jolexxa jolexxa merged commit 9c35643 into chickensoft-games:main Dec 1, 2023
7 checks passed
@jolexxa
Copy link
Member

jolexxa commented Dec 1, 2023

I can't push a new branch to your fork, and I don't want to just throw commits on top of what you're doing because I need your help reviewing and testing on Windows. I've gone ahead and merged this and opened up a refactor at #51 — mind helping me with it?

@paulloz
Copy link
Contributor

paulloz commented Dec 1, 2023

You can now remove UACHelper from the dependencies too 😉

@AdrasteonDev
Copy link
Contributor Author

AdrasteonDev commented Dec 2, 2023

I can't push a new branch to your fork, and I don't want to just throw commits on top of what you're doing because I need your help reviewing and testing on Windows. I've gone ahead and merged this and opened up a refactor at #51 — mind helping me with it?

I'll take a look at it :)

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