Skip to content

Commit

Permalink
Command not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Oct 30, 2024
1 parent db2581e commit 3dc9e97
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,32 @@ spawn
local-ic

heighliner
```

# If you get "command 'spawn' not found", run the following
# Linux / Windows / Some MacOS
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc
source ~/.bashrc

# MacOS
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc
source ~/.zshrc
## Command not found error

# Legacy MacOS Go
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.zshrc
source ~/.zshrc
# If you get "command 'spawn' not found", run the following

# Sometimes it can be good to also clear your cache
# especially WSL users
go clean -cache
```bash
# Gets your operating system
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
MSYS_NT*) machine=MSys;;
*) machine="UNKNOWN:${unameOut}"
esac
echo "Your operating system is: $machine"
echo -e "\nAdding the go binary location to your PATH for global access.\n\tIt will now prompt you for your password."

cmd='export PATH=$PATH:$(go env GOPATH)/bin'
if [ $machine == "Linux" ]; then
sudo echo "$cmd" >> ~/.bashrc && source ~/.bashrc
elif [ $machine == "Mac" ]; then
sudo echo "$cmd" >> ~/.zshrc && source ~/.zshrc
else
echo 'Please add the following to your PATH: $(go env GOPATH)/bin'
fi
```

0 comments on commit 3dc9e97

Please sign in to comment.