Skip to content

Conversation

@ThatOneCalculator
Copy link

@ThatOneCalculator ThatOneCalculator commented Mar 12, 2025

Why this should be merged

Removes trailing slash from install path (prevents cases like install.sh -b /usr/local/bin/ producing ava-labs/avalanche-cli info installed /usr/local/bin//avalanche)

How this works

  • Sets BINDIR to itself but with trailing slash removed if it exists
  • Then sets BINDIR to default if it's an empty string

How this was tested

  • Ran install script

How is this documented

  • Code comments

- sets default location to `~/.local/bin` (standard location on Linux, macOS, etc)

- removes trailing slash from install path (prevents cases like `install.sh -b /usr/local/bin/` producing `ava-labs/avalanche-cli info installed /usr/local/bin//avalanche`)

Signed-off-by: Kainoa Kanter <[email protected]>
@ThatOneCalculator ThatOneCalculator requested a review from a team as a code owner March 12, 2025 22:42
@github-project-automation github-project-automation bot moved this to Backlog 🗄️ in avalanchego Mar 12, 2025
@ThatOneCalculator ThatOneCalculator changed the title fix: install script location fix: install script location default & parsing Mar 12, 2025
ThatOneCalculator and others added 2 commits April 13, 2025 19:30
this is a non-standard location and will not be recognized in $PATH on pretty much any machine, but is kept here for backwards compatibility and *apparently* being 'easy to remember or locate'
@ThatOneCalculator
Copy link
Author

Requesting review from @felipemadero

@felipemadero
Copy link
Collaborator

Thank you for the contribution, and apologies for the delay! We've included an improved version of your fix in #2994 - the trailing slash removal now happens after all argument parsing so it works for both the -b flag and environment variable cases.

Appreciate you catching this issue!

@github-project-automation github-project-automation bot moved this from Backlog 🧊 to Done 🎉 in avalanchego Dec 22, 2025
@ThatOneCalculator ThatOneCalculator deleted the patch-1 branch December 22, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants