bash - $PATH macOS, move directory up in the hierarchy- to prefer execution of particular version -
i'm trying execute command (geth) program lives in directory lives in relatively high level of $path, can see here:
the command executing default related version lives in $gopath, $gopath is:
/users/s.matthew.english/go the code want execute lives at:
$home/consensys/pegasys/clients/quorum/0.0_quorum/quorum i tried add on higher line of ~/.zshrc so:
#------------------------------------------------------------- # attempt add quorum stuff... #------------------------------------------------------------- export path=$path:$home/consensys/pegasys/clients/quorum/0.0_quorum/quorum #------------------------------------------------------------- # related go #------------------------------------------------------------- export gopath=$home/go export path=$gopath/bin:$path but when call which geth still outputs this:
/users/s.matthew.english/go/bin/geth even if remove lines:
export gopath=$home/go export path=$gopath/bin:$path it still outputs /users/s.matthew.english/go/bin/geth when call which geth, , still find thegodirectory higher in my$path`, so:
/usr/local/opt/llvm/bin:/usr/local/opt/android-sdk/build-tools/19.1.0:/usr/local/opt/android-sdk/platform-tools:/usr/local/opt/android-sdk/tools:/usr/local/opt/gradle/bin:/usr/local/opt/maven/bin:/usr/local/opt/ant/bin:/users/s.matthew.english/.nvm/versions/node/v7.4.0/bin:/users/s.matthew.english/.rbenv/shims:/users/s.matthew.english/.rbenv/bin:/usr/local/opt/llvm/bin:/usr/local/opt/android-sdk/build-tools/19.1.0:/usr/local/opt/android-sdk/platform-tools:/usr/local/opt/android-sdk/tools:/usr/local/opt/gradle/bin:/usr/local/opt/maven/bin:/usr/local/opt/ant/bin:/users/s.matthew.english/go/bin:/users/s.matthew.english/.rbenv/shims:/users/s.matthew.english/.rbenv/bin:/usr/local/opt/llvm/bin:/usr/local/opt/android-sdk/build-tools/19.1.0:/usr/local/opt/android-sdk/platform-tools:/usr/local/opt/android-sdk/tools:/usr/local/opt/gradle/bin:/usr/local/opt/maven/bin:/usr/local/opt/ant/bin:/users/s.matthew.english/go/bin:/users/s.matthew.english/.rbenv/shims:/users/s.matthew.english/.rbenv/bin:/usr/local/opt/llvm/bin:/usr/local/opt/android-sdk/build-tools/19.1.0:/usr/local/opt/android-sdk/platform-tools:/usr/local/opt/android-sdk/tools:/usr/local/opt/gradle/bin:/usr/local/opt/maven/bin:/usr/local/opt/ant/bin:/users/s.matthew.english/go/bin:/users/s.matthew.english/.rbenv/shims:/users/s.matthew.english/.rbenv/bin:/users/s.matthew.english/.cargo/bin:/users/s.matthew.english/consensys/pegasys/clients/quorum/0.0_quorum/quorum/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/library/tex/texbin:/users/s.matthew.english/consensys/pegasys/clients/quorum/0.0_quorum/quorum:/users/s.matthew.english/consensys/pegasys/clients/quorum/0.0_quorum/quorum:/users/s.matthew.english/consensys/pegasys/clients/quorum/0.0_quorum/quorum how can change $path version of geth lives in $home/consensys/pegasys/clients/quorum/0.0_quorum/quorum execute in favour of 1 lives in /users/s.matthew.english/go?
this question related a prior question on ethereum.
edit:
so figured out need append reference quorum @ end of ~/.zshrc file, , affix rest of $path so:
#------------------------------------------------------------- # attempt add quorum stuff... #------------------------------------------------------------- export path=$home/consensys/pegasys/clients/quorum/0.0_quorum/quorum:$path and although move front of $path, nevertheless when call which geth following result (i.e. no change):


Comments
Post a Comment