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

Test if env vars are correctly set (unresolved for v5 & v6) #13

Open
dhirschfeld opened this issue Nov 27, 2020 · 9 comments
Open

Test if env vars are correctly set (unresolved for v5 & v6) #13

dhirschfeld opened this issue Nov 27, 2020 · 9 comments

Comments

@dhirschfeld
Copy link
Member

Something like:

if not "%DOTNET_ROOT%"=="%PREFIX%\dotnet" exit 1 
@dhirschfeld
Copy link
Member Author

Possibly better:

if "%DOTNET_ROOT%" neq "%PREFIX%\dotnet" exit 1 

@acesnik
Copy link
Contributor

acesnik commented Apr 21, 2021

I'm running into some issues on macOS with DOTNET_ROOT, which causes running dotnet to fail.

$ conda install -c conda-forge dotnet
$ dotnet
/opt/anaconda3/envs/test/bin/dotnet: line 2: /dotnet: No such file or directory
$ printenv | grep DOTNET
$ echo $?
1

@acesnik
Copy link
Contributor

acesnik commented Apr 21, 2021

I made some pull requests with setting DOTNET_ROOT within the small executable script to get around this for now.

#23
#24
#25

@acesnik
Copy link
Contributor

acesnik commented Apr 21, 2021

I think I figured out this issue!

macOS and linux have slightly different cp commands, so the environment variable scripts weren't actually making it into the right folders (https://twilblog.github.io/macos/linux/cp/copy/2017/02/03/macos-unix-cp-madness.html).

@dhirschfeld
Copy link
Member Author

@acesnik
Copy link
Contributor

acesnik commented Nov 10, 2021

Trying that out here, it doesn't look like it's working for osx, #44.

The bash command you used works on osx terminal, and the string in question certainly isn't length zero. Not sure what's going on. 😅

@acesnik acesnik changed the title Test if env vars are correctly set Test if env vars are correctly set (v5 & v6) Feb 15, 2022
@acesnik
Copy link
Contributor

acesnik commented Feb 15, 2022

For an update on this, I believe this is working for v3, but the solution doesn't work for v5 or v6 the last time I checked.

@acesnik acesnik changed the title Test if env vars are correctly set (v5 & v6) Test if env vars are correctly set (unresolved for v5 & v6) Feb 15, 2022
@dhirschfeld
Copy link
Member Author

Thanks - sorry I haven't had time to dig into it (yet)!

@acesnik
Copy link
Contributor

acesnik commented Feb 15, 2022

No worries!

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

No branches or pull requests

2 participants