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-cli 'tool path' install doesn’t seem to work on OS X/linux #2013

Closed
samritchie opened this issue Jul 2, 2018 · 7 comments · Fixed by #2014
Closed

fake-cli 'tool path' install doesn’t seem to work on OS X/linux #2013

samritchie opened this issue Jul 2, 2018 · 7 comments · Fixed by #2014

Comments

@samritchie
Copy link

Description

If I install fake via dotnet tool install fake-cli --tool-path .fake and then attempt to run .fake/fake run build.fsx I get an error like The application to execute does not exist: '/opt/src/.fake/..//opt/src/.fake/.store/fake-cli/5.1.0/fake-cli/5.1.0/tools/netcoreapp2.1/any/fake-cli.dll'.

Repro steps

As above.

Expected behavior

Should run my fake build.

Actual behavior

Returns the error The application to execute does not exist: '/opt/src/.fake/..//opt/src/.fake/.store/fake-cli/5.1.0/fake-cli/5.1.0/tools/netcoreapp2.1/any/fake-cli.dll'. - it appears to be some sort of path issue (on unix at least). I have not tested on Windows.

Known workarounds

Installing the tool globally (dotnet tool install -g fake-cli) works.

Related information

  • MacOS 10.13.5, debian:stretch-slim
  • 2.1.301 SDK, mono 5.8
@baronfel
Copy link
Contributor

baronfel commented Jul 2, 2018

See a related comment I made here, but there seems to be a bug in the dotnet sdk around installing tools to a non-default path.

@baronfel
Copy link
Contributor

baronfel commented Jul 2, 2018

Possibly related: https://github.com/dotnet/cli/issues/8829

@samritchie
Copy link
Author

The tool definitely installs (i get the directory structure with .store etc), it just fails when you run it. I don’t know much about dotnet tools, but the path it’s complaining about is clearly wrong.

@baronfel
Copy link
Contributor

baronfel commented Jul 2, 2018

One of the bugs I linked mentions using a relative tool-path causes the failure, which we use unedited in the .cmd and .sh files. Perhaps those files should expand the path to be absolute?

More info: https://stackoverflow.com/questions/7126580/expand-a-possible-relative-path-in-bash

@baronfel
Copy link
Contributor

baronfel commented Jul 2, 2018

Yes, that worked for me: dotnet new fake -b tool -tp $(pwd)/.faketool resulted in .faketool/fake, which runs correctly.

@baronfel
Copy link
Contributor

baronfel commented Jul 2, 2018

So the fix here should be to resolve the passed-in toolpath in the cmd and sh files (which naturally will need to be platform-specific) to make sure we use an absolute path for the toolpath

@baronfel
Copy link
Contributor

baronfel commented Jul 2, 2018

Slack is reporting that relative paths work fine on windows, so this fix can just go in the fake.tool.sh file.

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

Successfully merging a pull request may close this issue.

2 participants