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

FAKE bootstrap does not work with paths containing spaces+unicode characters #2054

Closed
MikaelUmaN opened this issue Aug 5, 2018 · 5 comments
Labels

Comments

@MikaelUmaN
Copy link

Description

In trying to follow the steps here: https://fake.build/fake-template.html , I receive an error and the fake-cli cannot be installed.

Repro steps

Run:

1. dotnet new -i "fake-template::*"
2. dotnet new fake
3. .\fake.cmd build

in the path: C:\Users\Mikael Öhman\Programming\ReproduceScaffold

Expected behavior

FAKE installs fake.exe in folder .fake.

Actual behavior

Following output is encountered:


PS C:\Users\Mikael Öhman\Programming\ReproduceScaffold> .\fake.cmd build

C:\Users\Mikael Öhman\Programming\ReproduceScaffold>SET TOOL_PATH=.fake

C:\Users\Mikael Öhman\Programming\ReproduceScaffold>IF NOT EXIST ".fake\fake.exe" (dotnet tool install fake-cli --tool-path ./.fake --version 5.* )
**MSBUILD : error MSB1006: Property is not valid.
Switch: hman\Programming\ReproduceScaffold\.fake\.store\.stage\scmgilqi.st0
For switch syntax, type "MSBuild /help"**
The tool package could not be restored.
Tool 'fake-cli' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

C:\Users\Mikael Öhman\Programming\ReproduceScaffold>".fake/fake.exe" build
'".fake/fake.exe"' is not recognized as an internal or external command,
operable program or batch file.

Known workarounds

Use other bootstrap methods such as "none", and use a global install of fake cli. Or, install fake cli by setting the toolpath in a relative way, not referencing the problematic characters (Ö) and spaces.

Related information

  • Windows
  • Latest release
  • .NET Core 2.1.302
  • Low
  • 5.X
@matthid
Copy link
Member

matthid commented Aug 5, 2018

Yes it looks like there is a bug in the template, or in the shell scripts to be exact

@matthid
Copy link
Member

matthid commented Aug 5, 2018

Also I noticed that we still install version 5.0.0 of the runtime because we have --version 5.* I expect the latest template to install the latest stable (which is 5.3 at the time). Let me take a look.

/cc @kblohm

@matthid
Copy link
Member

matthid commented Aug 5, 2018

Looks like you found two bugs:

One is that in the .sh script there are indeed quotes missing.
The other one is not our bug (and the fake.cmd script looks correct to me) and reproduces on the following command line:

matth@DESKTOP-FQBAN56 E:\Projects\FAKE\temp\Mikael Öhman\Reproduce
$ dotnet tool install fake-cli --tool-path ./.fake --version 5.*
MSBUILD : error MSB1006: Property is not valid.
Switch: hman\Reproduce\.fake\.store\.stage\24kqfmg2.aq2
For switch syntax, type "MSBuild /help"
The tool package could not be restored.
Tool 'fake-cli' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool

Can you please report this to the dotnet sdk repository?

Also we cannot workaround as dotnet tool install fake-cli --tool-path "E:\Projects\FAKE\temp\Mikael Öhman\Reproduce\.fake" --version 5.* yields the same error

@matthid matthid added the extern label Aug 5, 2018
matthid added a commit that referenced this issue Aug 5, 2018
@MikaelUmaN
Copy link
Author

Thanks for quick response and investigation. Will link to this in that repo.

@matthid
Copy link
Member

matthid commented Aug 27, 2018

I'm closing this since it is external and already fixed.

@matthid matthid closed this as completed Aug 27, 2018
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