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(install): protect path with whitespaces using quotes #953

Merged

Conversation

hpwxf
Copy link
Contributor

@hpwxf hpwxf commented Apr 3, 2022

When installing rustlings in a directory that contains whitespaces (not common, but possible), install.sh fails improperly.
The script tries to continue the process even if a command has failed.

My proposal is:

  • to protect variables that come from "outside"
  • to add set -euo pipefail to stop at the first error (error, undefined variable or pipe failure)

@hpwxf hpwxf marked this pull request as draft April 3, 2022 22:21
@hpwxf hpwxf marked this pull request as ready for review April 3, 2022 22:29
Copy link
Member

@shadows-withal shadows-withal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@shadows-withal shadows-withal merged commit 0a92262 into rust-lang:main Apr 4, 2022
@hpwxf hpwxf deleted the fix-installation-path branch April 4, 2022 15:39
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
…ion-path

fix(install): protect path with whitespaces using quotes
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