dotnet / install-scripts

MIT License
128 stars 68 forks source link

Install directory error when installing DotNet SDK for Logic Apps #424

Closed deepakjobanputra closed 6 months ago

deepakjobanputra commented 6 months ago

Vscode Azure Logic Apps extension v2.86.5 tries to install dependencies. Nodejs and Function Core tools installations are successful, but following exception is thrown during the dotnet SDK install:

__Running command: "powershell -ExecutionPolicy Bypass -File C:\Users\DEEPAK~1\AppData\Local\Temp.azurelogicapps\DotNetSDK\DotNetSDK.ps1 -InstallDir C:\Users\Deepak and Susan.azurelogicapps\dependencies\DotNetSDK -Channel 6.0"... 'and' is not a supported value for -Quality option. Supported values are: daily, signed, validated, preview, ga. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues. At C:\Users\Deepak and Susan\AppData\Local\Temp.azurelogicapps\DotNetSDK\DotNetSDK.ps1:305 char:19

The Local user name & user profile name on my pc is 'Deepak and Susan'. It looks like the install script (DotNetSDK.ps1) has a bug which handle spaces in the path name. Could this please be fixed this ASAP, as this a major blocker.

Could you also please ensure functions executing the dependencies can also handle spaces in directory paths, as I also get the following error when Azure Logic Apps extension is trying to execute the Dotnet SDK. Again it looks like the app can't handle spaces in the path name:

NodeJs Binaries: C:\Users\Deepak and Susan.azurelogicapps\dependencies\NodeJs FuncCoreTools Binaries: C:\Users\Deepak and Susan.azurelogicapps\dependencies\FuncCoreTools 5:39:13 PM: Running command: "C:\Users\Deepak and Susan.azurelogicapps\dependencies\DotNetSDK\dotnet.exe --version"... DotNetSDK Binaries: C:\Users\Deepak and Susan.azurelogicapps\dependencies\DotNetSDK 'C:\Users\Deepak' is not recognized as an internal or external command, operable program or batch file.

Many thanks. Deepak

f-alizada commented 6 months ago

Hello @deepakjobanputra thank you for raising the issue. From the command that you have shared:

C:\Users\DEEPAK~1\AppData\Local\Temp.azurelogicapps\DotNetSDK\DotNetSDK.ps1 -InstallDir C:\Users\Deepak and Susan.azurelogicapps\dependencies\DotNetSDK -Channel 6.0"...

The -InstallDir argument value is provided unquoted hence resulting the error. In cases when the argument value contains spaces it should be enclosed in quotation marks

Example: .\dotnet-install.ps1 -InstallDir ".\install directory" -Channel 8.0 -Runtime dotnet

I would suggest to file a bug to the repository of the extension.

YuliiaKovalova commented 6 months ago

Close the ticket since the issue does not exist on the install-scripts side. Feel free to reopen if you have any concerns or questions.