1

I am trying to add the Hashicorp vault exec to my $PATH variable in ~/.zshrc.

Below steps were followed:

  1. Edit the .zshrc $PATH as below:
    export PATH=/usr/local/mysql/bin:/Users/myuserName/Downloads/flyway-6.0.4:/Users/myUserName/Documents/vault:$PATH
    
  2. Saved the .zshrc file
  3. Sourced the .zshrc file with the command source ~/.zshrc and even restarted terminal

Upon typing the vault command, I get command not found error. Help needed.

1
  • since the exec file is pointed here, do i need to add an extension?
    – Codershree
    Oct 19, 2019 at 9:11

1 Answer 1

2

Found the issue: I was pointing to the executable file in the path directly rather than pointing to just the folder.

Upon changing the Path from

/Users/myUserName/Documents/vault

to

/Users/myUserName/Documents/

the issue is fixed.

2
  • Note that it's not very usual to put an executable in ~/Documents. Create a directory /Users/myUserName/bin and place it there.
    – slhck
    Oct 19, 2019 at 10:05
  • Yes understood.It was just for a trial.
    – Codershree
    Oct 19, 2019 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .