add-to-startup: fix path for Scoop compatibility, remove interactive prompt#84
Open
OmiChrome wants to merge 2 commits into
Open
add-to-startup: fix path for Scoop compatibility, remove interactive prompt#84OmiChrome wants to merge 2 commits into
OmiChrome wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! Found a couple of small issues in
add-to-startup.batthat break it when the app is installed via package managers like Scoop (or run from other automated scripts).This PR fixes them while keeping everything exactly the same for regular manual users.
The changes
Scoop/Package Manager support: When Scoop installs apps, it places them in a versioned folder (like
0.11\) and creates acurrent\symlink pointing to it. Because%~dp0resolves to the versioned folder, the scheduled task gets pinned to0.11and silently breaks every time the app updates.Fix: The script now checks if a
current\directory exists next to it. If it does, it uses that stable path for the task. If not, it just uses%~dp0like before.Removed the interactive
(Y/n)prompt: Theset /pprompt hangs forever if the bat script is run non-interactively by an installer/package manager. The script already prints the path it's going to use anyway, so I just removed the prompt.Hope this helps!
Ref: #83, ScoopInstaller/Extras#17461