Skip to content

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

Merged
r15ch13 merged 3 commits intoScoopInstaller:masterfrom
leonyu:fix-and-test-warn_on_overwrite
Sep 7, 2018
Merged

Fix .ps1 shim parsing logic due to my prior PR#2564
r15ch13 merged 3 commits intoScoopInstaller:masterfrom
leonyu:fix-and-test-warn_on_overwrite

Conversation

@leonyu
Copy link
Copy Markdown
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.

Comment thread lib/core.ps1
@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