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(scoop-alias): Prevent overwrite existing file when adding alias #5577

Merged
merged 10 commits into from
Apr 8, 2024

Conversation

HUMORCE
Copy link
Member

@HUMORCE HUMORCE commented Jul 11, 2023

Description

Motivation and Context

This feature exists in the tests, but is not implemented.

How Has This Been Tested?

before:

~\scoop
❯ ni .\shims\scoop-xxx.ps1 | Out-Null
~\scoop
❯ scoop alias add xxx 'new alias'
~\scoop
❯ cat .\shims\scoop-xxx.ps1
# Summary:
new alias
~\scoop
❯

after:

~\scoop
❯ ni .\shims\scoop-xxx.ps1 | Out-Null
~\scoop
❯ scoop alias add xxx 'new alias'
File 'scoop-xxx.ps1' already exists in shims directory.
~\scoop
❯ cat .\shims\scoop-xxx.ps1
~\scoop
❯

bin\test.ps1 in powershell 5 and 7, all passed

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

rashil2000
rashil2000 previously approved these changes Jan 8, 2024
@niheaven
Copy link
Member

niheaven commented Apr 8, 2024

image

niheaven
niheaven previously approved these changes Apr 8, 2024
@niheaven niheaven merged commit 81e7dec into ScoopInstaller:develop Apr 8, 2024
2 checks passed
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