Commit fd7e38f
herdiyanitdev
fix(ng-dev): address alan-agius4 review — remove redundant shell default, audit call sites
- Remove `shell: options.shell ?? false` from spawn() and spawnSync() — redundant
since false is already Node.js default when shell option is omitted entirely.
- Remove Log.warn() from exec() per reviewer suggestion; Node.js itself issues
the appropriate deprecation warning when exec() is used with shell expansion.
- Audited all ChildProcess.spawn/spawnSync/exec call sites across ng-dev/:
- external-commands.ts:206 '. ~/.nvm/nvm.sh && nvm install'
→ Added explicit shell: true (requires shell built-in dot command and &&)
- repo-directory.ts:13 spawnSync('git', ['rev-parse --show-toplevel'])
→ Fixed incorrectly merged args to ['rev-parse', '--show-toplevel']; with
shell: false (now the default), the single-string form would fail because
git receives 'rev-parse --show-toplevel' as one literal argument.
- All other spawn/spawnSync calls use plain binary + args arrays and are safe
with the secure shell: false default.
- SpawnOptions.shell remains exposed for callers that genuinely require it.1 parent 2701597 commit fd7e38f
File tree
3 files changed
+6
-7
lines changed- ng-dev
- release/publish
- utils
3 files changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 146 | | |
150 | 147 | | |
151 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments