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 .ps1 shim parsing logic due to my prior PR #2564

Merged
merged 3 commits into from
Sep 7, 2018
Merged

Fix .ps1 shim parsing logic due to my prior PR #2564

merged 3 commits into from
Sep 7, 2018

Conversation

leonyu
Copy link
Contributor

@leonyu leonyu commented Sep 6, 2018

Due to my prior PR #2562 which changed the content of .ps1 shims, the code that attempts to warn about shims being overwritten no longer detects app name correctly. This is to correct that.

Since now the path of the app can be on either first line or 2nd line, my implementation just assumes shims will be utf8 files and try to find first the app name in the first 1000 characters. This works for both the old shim and the new shim, and allow for some forward flexibility towards how shim code is written going forward.

@r15ch13 r15ch13 merged commit 9bc7d5f into ScoopInstaller:master Sep 7, 2018
@leonyu leonyu deleted the fix-and-test-warn_on_overwrite branch September 7, 2018 14:27
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.

2 participants