Skip to content

Commit 2cc96ea

Browse files
committed
fix: make process.execve's args argument optional
Align the code with the documentation and similar methods used to execute os commands - the `args` argument should be optional, and if omitted, treated as an empty array (`[]`). Fixes: #58411
1 parent 283ed53 commit 2cc96ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/process/per_thread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ function wrapProcessMethods(binding) {
279279
return true;
280280
}
281281

282-
function execve(execPath, args, env) {
282+
function execve(execPath, args = [], env) {
283283
emitExperimentalWarning('process.execve');
284284

285285
const { isMainThread } = require('internal/worker');

0 commit comments

Comments
 (0)