Skip to content

Commit

Permalink
install.sh: Add echo_npm_postinstall
Browse files Browse the repository at this point in the history
Updates #2349
  • Loading branch information
nhooyr committed Dec 18, 2020
1 parent 9d66d4d commit d5e8263
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ echo_latest_version() {
echo "$version"
}

echo_npm_postinstall() {
echoh
cath << EOF
The npm package has been installed successfully!
Please extend your path to use code-server:
PATH="$NPM_BIN_DIR:\$PATH"
Please run with:
code-server
EOF
}

echo_standalone_postinstall() {
echoh
cath << EOF
Expand Down Expand Up @@ -392,6 +403,7 @@ install_npm() {
echoh "Installing with yarn."
echoh
"$sh_c" yarn global add code-server --unsafe-perm
NPM_BIN_DIR="$(yarn global bin)" echo_npm_postinstall
return
elif command_exists npm; then
sh_c="sh_c"
Expand All @@ -401,6 +413,7 @@ install_npm() {
echoh "Installing with npm."
echoh
"$sh_c" npm install -g code-server --unsafe-perm
NPM_BIN_DIR="$(npm bin -g)" echo_npm_postinstall
return
fi
echoh
Expand Down

0 comments on commit d5e8263

Please # to comment.