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

Use POSIX-compliant . instead of source in .profile #2616

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

Xyene
Copy link
Contributor

@Xyene Xyene commented Dec 20, 2020

The invocation to source introduced in 850adef is not POSIX-compliant,
and not available in some shells. Use . instead, which will work in
all shells. Concretely, this was failing in Docker builds, where
/bin/sh is not Bash.

The invocation to `source` introduced in 850adef is not POSIX-compliant,
and not available in some shells. Use `.` instead, which will work in
all shells. Concretely, this was failing in Docker builds, where
`/bin/sh` is not Bash.
Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

Thank you for this.

@kinnison kinnison merged commit 085a23b into rust-lang:master Dec 21, 2020
@Xyene
Copy link
Contributor Author

Xyene commented Dec 21, 2020

Thanks! Any idea when this will roll to rustup.sh? No big rush, just want to know whether it'll happen ~soon, or if I should work around it locally.

@Xyene Xyene deleted the posix-source branch December 21, 2020 14:41
@kinnison
Copy link
Contributor

Continue to work around locally for now I'm afraid. I will be trying to do a release early in Jan but can't guarantee when.

@DamianFekete
Copy link

@kinnison , I think there is a small issue with this change, but I'm also not sure if this is acceptable for this project or not.

  • Uninstall/update won't work as expected with previously installed versions (unix.rs#do_remove_from_path now searches for . "$HOME/.cargo/env" although the resource file was modified with source "$HOME/.cargo/env")
  • Rust will source the env file twice (not a practical problem, but not so nice):
# ~/.bashrc
source "$HOME/.cargo/env"
. "$HOME/.cargo/env"

@kinnison
Copy link
Contributor

Hmm, that's a good point, we should probably detect both kinds in order that people don't end up confused on uninstallation. I've filed #2623 to this effect.

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