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

DotNet.exec (dotnet installer) fails when username has a blank #2319

Closed
SCullman opened this issue May 19, 2019 · 1 comment
Closed

DotNet.exec (dotnet installer) fails when username has a blank #2319

SCullman opened this issue May 19, 2019 · 1 comment
Labels

Comments

@SCullman
Copy link
Contributor

Description

I see the following error message:

Starting task 'DotNet:version': running dotnet --version
C:\Users\Stefan Cullmann\Documents\Projekte\Thoth.Json.Net> "C:\Program Files\dotnet\dotnet.exe" --version (In: false, Out: true, Err: true)
2.2.107
Finished (Success) 'DotNet:version' in 00:00:00.1786084
C:\Users\Stefan Cullmann\AppData\Local\Temp\> "powershell" -ExecutionPolicy Bypass -NoProfile -NoLogo -NonInteractive -Command "C:\Users\Stefan Cullmann\AppData\Local\Temp\dotnet_install_eb0a191797624dd3a48fa681d3061212.ps1 -Verbose -Channel master -Version 2.2.101 -InstallDir "C:\Users\Stefan Cullmann\AppData\Local\Microsoft\dotnet" -NoPath; if (-not $?) { exit -1 };" (In: false, Out: false, Err: false)
C:\Users\Stefan : Die Benennung "C:\Users\Stefan" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren 
Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.
In Zeile:1 Zeichen:1
+ C:\Users\Stefan Cullmann\AppData\Local\Temp\dotnet_install_eb0a191797 ...

Translated:
The name "C:\Users\Stefan" was not recognized as the name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if the path is correct (if included), and repeat the process.

Repro steps

  • Add a user with a blank in the name in windows.
  • Login as that user
  • Clone https://github.com/thoth-org/Thoth.Json.Net.git
  • Run Fake

Expected behavior

The script should run

Actual behavior

The error is raised

Known workarounds

Comment out these lines 140 -142

let result = DotNet.exec (dtntWorkDir testNetCoreDir) "" "Tests.dll"

    if not result.OK then failwithf "Expecto for netcore tests failed.
@matthid
Copy link
Member

matthid commented May 19, 2019

I'd say that is related to the space in your user profile folder.. Obviously, it still has to work but removing the space would probably be a workaround.

We probably need to do some additional escaping within the -Command argument

@matthid matthid added the bug label May 19, 2019
@matthid matthid changed the title DotNet.exec fails because my username has a blank DotNet.exec fails when username has a blank Jun 9, 2019
@matthid matthid changed the title DotNet.exec fails when username has a blank DotNet.exec (dotnet installer) fails when username has a blank Jun 9, 2019
@matthid matthid closed this as completed in 3ef27d5 Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants