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

install.sh script has escaping error #3166

Open
dan-massey opened this issue Jan 8, 2025 · 4 comments · May be fixed by #3175
Open

install.sh script has escaping error #3166

dan-massey opened this issue Jan 8, 2025 · 4 comments · May be fixed by #3175

Comments

@dan-massey
Copy link

This project is for the Heroku CLI only and issues are reviewed as we are able. If you need more immediate assistance or help with anything not specific to the CLI itself, please use https://help.heroku.com.

Do you want to request a feature or report a bug?

Bug
What is the current behavior?

On an Oracle Linux machine, running the install bash script (curl https://cli-assets.heroku.com/install.sh | sh) would show the error "Your path is missing /usr/local/bin, you need to add this to use this installer." even if /usr/local/bin was available in the current PATH.

What is the expected behavior?

The install bash script should succeed.

I believe this can be achieved by changing the escaping in the if condition

if [[ ! ":$PATH:" == *":/usr/local/bin:"* ]]; then

(instead of if [[ ! ":\$PATH:" == *":/usr/local/bin:"* ]];)

@justinwilaby
Copy link
Contributor

justinwilaby commented Jan 9, 2025

HI @dan-massey - It does seem like your suggestion will work. If I'm not mistaken, the existing codeif [[ ! ":\$PATH:" == *":/usr/local/bin:"* ]]; then could match on paths like /usr/local/bin64 or usr/local/bin.old, as well potentially leading to other defects.

Are you able to install successfully after making this change locally?

@dan-massey
Copy link
Author

Yes, I made the change in a local copy of the script and successfully installed the CLI.

I'm happy to open a PR if it would be helpful/accepted.

@justinwilaby
Copy link
Contributor

justinwilaby commented Jan 9, 2025

@dan-massey - By all means. Please open a PR. we love our contributors!

@justinwilaby
Copy link
Contributor

W-17567855 created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants