File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,17 @@ echo_latest_version() {
7979 echo " $version "
8080}
8181
82+ echo_npm_postinstall () {
83+ echoh
84+ cath << EOF
85+ The npm package has been installed successfully!
86+ Please extend your path to use code-server:
87+ PATH="$NPM_BIN_DIR :\$ PATH"
88+ Please run with:
89+ code-server
90+ EOF
91+ }
92+
8293echo_standalone_postinstall () {
8394 echoh
8495 cath << EOF
@@ -392,6 +403,7 @@ install_npm() {
392403 echoh " Installing with yarn."
393404 echoh
394405 " $sh_c " yarn global add code-server --unsafe-perm
406+ NPM_BIN_DIR=" $( yarn global bin) " echo_npm_postinstall
395407 return
396408 elif command_exists npm; then
397409 sh_c=" sh_c"
@@ -401,6 +413,7 @@ install_npm() {
401413 echoh " Installing with npm."
402414 echoh
403415 " $sh_c " npm install -g code-server --unsafe-perm
416+ NPM_BIN_DIR=" $( npm bin -g) " echo_npm_postinstall
404417 return
405418 fi
406419 echoh
You can’t perform that action at this time.
0 commit comments