Commit 083418f
authored
fix: resolve Node 24+ spawn deprecation warning (DEP0190) (#1130)
When using spawn with shell: true, passing args as a separate array
causes a deprecation warning in Node 24+:
'Passing args to a child process with shell option true can lead to
security vulnerabilities, as the arguments are not escaped, only
concatenated.'
This commit fixes the issue by joining the command and args into a
single command string before passing to spawn, which is the recommended
pattern for shell: true usage.
Fixes #11021 parent 13c3fc9 commit 083418f
File tree
3 files changed
+13
-13
lines changed- apps/generator-cli/src/app/services
3 files changed
+13
-13
lines changedLines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | | - | |
| 181 | + | |
183 | 182 | | |
184 | 183 | | |
185 | 184 | | |
| |||
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
195 | | - | |
196 | | - | |
| 194 | + | |
197 | 195 | | |
198 | 196 | | |
199 | 197 | | |
| |||
206 | 204 | | |
207 | 205 | | |
208 | 206 | | |
209 | | - | |
210 | | - | |
| 207 | + | |
211 | 208 | | |
212 | 209 | | |
213 | 210 | | |
| |||
227 | 224 | | |
228 | 225 | | |
229 | 226 | | |
230 | | - | |
231 | | - | |
| 227 | + | |
232 | 228 | | |
233 | 229 | | |
234 | 230 | | |
| |||
303 | 299 | | |
304 | 300 | | |
305 | 301 | | |
306 | | - | |
307 | | - | |
| 302 | + | |
308 | 303 | | |
309 | 304 | | |
310 | 305 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | | - | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
| 155 | + | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| |||
0 commit comments