Global tools are not found on zsh
See original GitHub issueThe below example is for FAKE but I can repro with other global tools as well, such as weeknumber
. I tried to remove any profile customizations from my profile by running zsh without them and the problem persists. I’ve provided my PATH as well to show that the global tools dir is in fact in there.
Steps to reproduce
- Have the 2.1 preview SDK installed (2.1.300-rc1-008673)
- run zsh with no profile via
zsh --no-rcs
dotnet tool install -g fake-cli --version '5.0.0-*'
fake
Expected behavior
The FAKE cli help should display
Actual behavior
The shell reports that fake
could not be found.
Known workarounds
- run the command in bash, or
- run the fake command explicitly, via
~/.dotnet/tools/fake
Environment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.1.300-rc1-008673
Commit: f5e3ddbe73
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.13
OS Platform: Darwin
RID: osx.10.13-x64
Base Path: /usr/local/share/dotnet/sdk/2.1.300-rc1-008673/
Host (useful for support):
Version: 2.1.0-rc1
Commit: eb9bc92051
.NET Core SDKs installed:
1.0.4 [/usr/local/share/dotnet/sdk]
2.0.0 [/usr/local/share/dotnet/sdk]
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.101 [/usr/local/share/dotnet/sdk]
2.1.200 [/usr/local/share/dotnet/sdk]
2.1.300-preview2-008533 [/usr/local/share/dotnet/sdk]
2.1.300-rc1-008673 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0-preview2-final [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.0-rc1-final [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0-preview2-final [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.0-rc1-final [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-preview2-26406-04 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-rc1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
$PATH:
/Users/chethusk/.rbenv/shims:/Users/chethusk/.nodenv/shims:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
Issue Analytics
- State:
- Created 5 years ago
- Reactions:22
- Comments:49 (18 by maintainers)
Top Results From Across the Web
Global tools are not found on zsh · Issue #9415 · dotnet/sdk
If someone installed zsh using oh-my-zsh AFTER the dotnet CLI set up the global tools, then everything would be fine.
Read more >zsh: command not found: dotnet-ef
You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Read more >Making .NET Core Global Tools Work With OhMyZsh
Every time I would invoke the global tool I would get the following error: ➜ dotnet-project-licenses --help zsh: command not found: ...
Read more >How to Fix Zsh Command Not Found Error on macOS [5 ...
This article explains the zsh command not found error on Mac or Linux, along with the exact reasons and 5 solutions to the...
Read more >Troubleshoot .NET tool usage issues
It's possible that the global or local NuGet config file is missing the public Microsoft NuGet feed. Use a combination of the --add-source...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I´ve ran into the same problem today. Got resolved editing ~/.zshrc, and putting a new line with:
This is the answer! Thank so much.