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 env.PATH after conda activate #264

Merged
merged 1 commit into from
Jul 13, 2022
Merged

Conversation

WindSoilder
Copy link
Contributor

@WindSoilder WindSoilder commented Jul 13, 2022

When activate conda env, the $env.PATH is a bash like path, it's not working well inside nushell(I don't if it's nushell issue)
img

The fix is making $env.PATH to be a list rather than str after conda activate, so everything works fine
img

@fdncred
Copy link
Collaborator

fdncred commented Jul 13, 2022

@WindSoilder If you add this to your env.nu does it work?

let-env ENV_CONVERSIONS = {
    "PATH": {
        from_string: { |s| $s | split row (char esep) }
        to_string: { |v| $v | path expand | str collect (char esep) }
    }
}

I'm also fine with landing this. I just was curious if the above change alters the way the script currently works. I think this is in the default_env.nu. Maybe it's ignored and your change fixes it?

@WindSoilder
Copy link
Contributor Author

It's exists in default env.nu, I haven't change anything about it.

So it doesn't work...

@fdncred
Copy link
Collaborator

fdncred commented Jul 13, 2022

It's exists in default env.nu, I haven't change anything about it.

So it doesn't work...

ok, thanks for checking.

@fdncred fdncred merged commit 38b9cc4 into nushell:main Jul 13, 2022
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.

None yet

2 participants