dotnet / install-scripts

MIT License
128 stars 68 forks source link

DotNetSDK Installation Script Fails with Spaces in Path for -InstallDir Parameter #484

Closed PhoenixUA closed 1 week ago

PhoenixUA commented 1 week ago

While attempting to install the DotNetSDK using the provided installation script, I encountered an issue where the script fails if the path specified for the -InstallDir parameter contains spaces. The script works correctly when the path uses the short name (8.3 format) for the directory with spaces.

Steps to Reproduce:

  1. Download the DotNetSDK installation script from https://dot.net/v1/dotnet-install.ps1.
  2. Execute the script using the following command, where the -InstallDir parameter includes a path with spaces:
    powershell -ExecutionPolicy Bypass -File C:\Users\JOHNDO~1\AppData\Local\Temp\.azurelogicapps\DotNetSDK\DotNetSDK.ps1 -InstallDir "C:\Users\John Doyle\.azurelogicapps\dependencies\DotNetSDK" -Channel 6.0
  3. The script fails with the following error message:
    'Doyle\.azurelogicapps\dependencies\DotNetSDK' 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.
  4. When the path with spaces is replaced by its 8.3 format (e.g., JOHNDO~1), the script executes successfully:
    powershell -ExecutionPolicy Bypass -File C:\Users\JOHNDO~1\AppData\Local\Temp\.azurelogicapps\DotNetSDK\DotNetSDK.ps1 -InstallDir C:\Users\JOHNDO~1\.azurelogicapps\dependencies\DotNetSDK -Channel 6.0

Expected Behavior: The script should correctly handle paths with spaces when specified for the -InstallDir parameter without requiring the use of the 8.3 format.

Actual Behavior: The script fails with an error when the path specified for the -InstallDir parameter contains spaces.

Environment: OS: Windows 11 Home (10.0.22631 Build 22631) PowerShell version: 5.1.22621.3672

Suggested Solution: Please modify the script to handle paths with spaces correctly.

Thank you for addressing this issue. Please let me know if any additional information is required.

PhoenixUA commented 1 week ago

It has been closed as it is not related to the install scripts themselves, but rather to the specific Azure Logic Apps installation bundle.

Moved to https://github.com/Azure/logicapps/issues/1096