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

Install script fails on Arch Linux (unbound variable VERSION_ID) #11

Closed
StephenWeatherford opened this issue Oct 23, 2019 · 4 comments
Closed

Comments

@StephenWeatherford
Copy link
Contributor

From microsoft/vscode-azurearmtools#318:

Downloading .NET Core tooling version(s) 2.2.5 ...... Error!
Failed to download .NET Core tooling 2.2.5:
/home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 147: VERSION_ID: unbound variable
/home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 205: VERSION_ID: unbound variable
/home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 147: VERSION_ID: unbound variable
/home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 147: VERSION_ID: unbound variable

Error: /home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 147: VERSION_ID: unbound variable
/home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 205: VERSION_ID: unbound variable
/home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 147: VERSION_ID: unbound variable
/home/ha/.vscode/extensions/msazurermtools.azurerm-vscode-tools-0.7.0/assets/install scripts/dotnet-install.sh: line 147: VERSION_ID: unbound variable

If I run dotnet-install.sh, it works with the similar unbound VERSION_ID error. It installs sdk 2.1.802.
I realized that the dotnet-install.sh script sources /etc/os-release to get VERSION_ID, but arch linux does not define that variable.
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux

I tried adding a line to /etc/os-release and it worked.
VERSION_ID=0
So, it looks like the issue needs to be filed for dotnet-install.sh.

@StephenWeatherford
Copy link
Contributor Author

Any progress on this? Thx.

@sfoslund
Copy link
Member

sfoslund commented Dec 19, 2019

I haven't started looking into this- I likely won't get to it until the new year.

@sfoslund
Copy link
Member

sfoslund commented Feb 5, 2020

Looking into this issue a bit, I believe it will be solved when the vscode-azurearmtools extension converts to using this extension for acquisition. The install scripts in the repo are out of date and don't have a fix that was made for this issue. This shouldn't be an issue with this extension since we dynamically acquire the most updated versions of the installation scripts.

It looks like the original issue also had a separate bug with the error Unexpected path returned for .net core in which dotnet.exe did not exist. I've adapted the arm tools solution for detecting corrupted installations here, which should at least give a better error in this case. It might make sense to do more than throw an error here, i.e. try to reinstall the corrupted version.

Let me know if I'm misunderstanding either of those bugs, but if not I think we're okay to close this (at least in this repo). @StephenWeatherford if you think it's worthwhile, I'll track the work for attempting to repair corrupted versions as a separate issue.

@StephenWeatherford
Copy link
Contributor Author

Sounds good, thanks!

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