-
Notifications
You must be signed in to change notification settings - Fork 926
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(cli/self-update): fix Nushell-related suggestions and scripts #4265
Conversation
@rami3l Just ran this in a VM
Post install prompt:
Generated env.nu:
$env.PATH contents:
Unfortunately generated env.nu still uses posix-like |
@Yethal Thanks for your quick response. As per #4265 (comment) this is the expected behavior (for now); will fix. |
Thank you for this, I hadn't been following the recent changes. @rami3l if you look at the documentation for the next release It shows out nushell intends for it to be done in the future |
8b115df
to
fa5f778
Compare
@Yethal @alluring-mushroom Sorry for the back and forth, but I have tried to apply the suggestions from both of you. Would you mind giving this PR another shot? |
8d09237
to
4c7d07a
Compare
@rami3l We're good. Path is properly appended so the issue is resolved. For easier multiplatorm support (once that happens) you may want to switch over to using the
|
@Yethal Thanks for your feedback! I'm glad to see that this PR is working for you. Regarding your two suggestions, I think since we are handling path joining from Rust's side, it might be better to postpone the change regarding On the other hand, your -if ($"{cargo_bin}" not-in ($env.Path | split row (char esep))) {
- $env.Path = ($env.Path | prepend $"{cargo_bin}")
-}
+use std/util "path add"
+path add $"{cargo_bin}" ... I hope that looks reasonable to you. Besides, do you think this |
Yes, this looks reasonable. |
4c7d07a
to
f84fcf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
f84fcf0
to
65a6a2a
Compare
…x_source_env!()` Co-authored-by: Yethal <26117918+Yethal@users.noreply.github.com>
Co-authored-by: Yethal <26117918+Yethal@users.noreply.github.com>
Co-authored-by: Yethal <26117918+Yethal@users.noreply.github.com>
See <nushell/nushell#14860> for more context.
65a6a2a
to
8bab87b
Compare
Supersedes #4230. Closes #4242.
PS: Thanks for your contribution, @Yethal! I've made you the co-author of
twothree main commits in this PR.@alluring-mushroom @Yethal thanks again for your report! I don't use Nushell personally and I'm not sure if this has covered all the corner cases (it would be difficult to test automatically due to the amount of different setups we need to support). Would you mind trying out this patch and see if the fix works for you?