Skip to content

Commit d72d441

Browse files
committed
add pnpm CI=true
1 parent 1548382 commit d72d441

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
### Fixed
77

88
- pnpm install and update commands now use `--config.node-linker=hoisted` to produce a flat `node_modules` layout compatible with AWS Lambda (which does not support symlinks)
9+
- pnpm commands now pass `CI=true` in the environment to prevent interactive prompts in non-TTY contexts
910

1011
---
1112

src/actions/install-update.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ module.exports = function hydrator (params, callback) {
9898
}
9999
catch { /* noop */ }
100100
let cmd = localPnpm ? `npx pnpm --config.node-linker=hoisted i ${prodFlag}` : `pnpm --config.node-linker=hoisted i ${prodFlag}`
101-
exec(cmd, options, callback)
101+
let pnpmOptions = { ...options, env: { ...(options.env || process.env), CI: 'true' } }
102+
exec(cmd, pnpmOptions, callback)
102103
}
103104
else if (isYarn) {
104105
let localYarn
@@ -121,7 +122,8 @@ module.exports = function hydrator (params, callback) {
121122
if (isPnpm) {
122123
let localPnpm = exists(join(cwd, 'node_modules', 'pnpm'))
123124
let cmd = localPnpm ? 'npx pnpm --config.node-linker=hoisted update' : 'pnpm --config.node-linker=hoisted update'
124-
exec(cmd, options, callback)
125+
let pnpmOptions = { ...options, env: { ...(options.env || process.env), CI: 'true' } }
126+
exec(cmd, pnpmOptions, callback)
125127
}
126128
else if (isYarn) {
127129
let localYarn = exists(join(cwd, 'node_modules', 'yarn'))

0 commit comments

Comments
 (0)