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

Allow renaming of binaries #7

Merged
merged 4 commits into from
Mar 5, 2022
Merged

Allow renaming of binaries #7

merged 4 commits into from
Mar 5, 2022

Conversation

marwanhawari
Copy link
Owner

This PR adds a rename subcommand to allow users to rename binaries. This is preferred over using an alias in your .zshrc or .bashrc because renaming a binary with rename will update the Stewfile.lock.json as well as the binary name itself. This means that commands like stew uninstall <renamedBinary> and stew upgrade <renamedBinary> will work, which is not true if you use an alias.

Users will also automatically be prompted to rename a binary if:

  1. The asset itself is the binary. Often these have names like binary-v0.0.1-darwin-arm64, which is not the name that people want to type into the command line.
  2. If the binary is not automatically detected inside an archived asset (which can happen if 0 or >1 executable files are found in an archive). After selecting the binary, they will be prompted to rename it.

Finally, this PR switch out any usage of the path library in favor of the filepath library which uses / or \ in an operating-system compatible way. path only uses /.

@marwanhawari marwanhawari self-assigned this Mar 5, 2022
@marwanhawari marwanhawari merged commit 528fe6d into main Mar 5, 2022
@marwanhawari marwanhawari deleted the allow_rename_3 branch March 5, 2022 19:46
@marwanhawari
Copy link
Owner Author

resolves #3

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.

None yet

1 participant