Skip to content

Commit

Permalink
Enforce unique $path locations with typeset -U
Browse files Browse the repository at this point in the history
Related: #5
  • Loading branch information
eieioxyz committed Jun 30, 2020
1 parent 212adf8 commit 3843d03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup_node.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo "\n<<< Starting Node Setup >>>\n"

# Node versions are managed with `n`, which is in the Brewfile.
# See zshrc for N_PREFIX variable and addition to PATH.
# See zshrc for N_PREFIX variable and addition to $path array.

if exists node; then
echo "Node $(node --version) & NPM $(npm --version) already installed"
Expand Down
11 changes: 8 additions & 3 deletions zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ PROMPT='
RPROMPT='%*'


# Add Locations to $PATH Variable
export PATH="$N_PREFIX/bin:$PATH"
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# Add Locations to $path Array
typeset -U path

path=(
"$N_PREFIX/bin"
$path
"/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
)


# Write Handy Functions
Expand Down

0 comments on commit 3843d03

Please sign in to comment.