Skip to content

Commit 220bc35

Browse files
committed
Support pnpm for post-install
1 parent ab0972e commit 220bc35

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎ci/build/npm-postinstall.sh‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,16 @@ main() {
9090
fi
9191
}
9292

93-
install_with_yarn_or_npm() {
93+
install_with_package_manager() {
9494
echo "User agent: ${npm_config_user_agent-none}"
95-
# For development we enforce npm, but for installing the package as an
95+
# For development we enforce pnpm, but for installing the package as an
9696
# end-user we want to keep using whatever package manager is in use.
9797
case "${npm_config_user_agent-}" in
98+
pnpm*)
99+
if ! pnpm install --prod; then
100+
return 1
101+
fi
102+
;;
98103
npm*)
99104
if ! npm install --omit=dev; then
100105
return 1
@@ -116,15 +121,15 @@ install_with_yarn_or_npm() {
116121
vscode_install() {
117122
echo 'Installing Code dependencies...'
118123
cd lib/vscode
119-
if ! install_with_yarn_or_npm; then
124+
if ! install_with_package_manager; then
120125
return 1
121126
fi
122127

123128
symlink_bin_script remote-cli code code-server
124129
symlink_bin_script helpers browser browser .sh
125130

126131
cd extensions
127-
if ! install_with_yarn_or_npm; then
132+
if ! install_with_package_manager; then
128133
return 1
129134
fi
130135

0 commit comments

Comments
 (0)