mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
fix: Quote zero-length strings in arguments (#1551)
If a zero-length string is passed, it does not get properly quoted, and then it is not properly passed to the child process
This commit is contained in:
committed by
Remy Sharp
parent
aa41ab2124
commit
2973afbd26
@@ -69,7 +69,7 @@ var utils = (module.exports = {
|
||||
args.map(function (arg) {
|
||||
// if an argument contains a space, we want to show it with quotes
|
||||
// around it to indicate that it is a single argument
|
||||
if (arg.indexOf(' ') === -1) {
|
||||
if (arg.length > 0 && arg.indexOf(' ') === -1) {
|
||||
return arg;
|
||||
}
|
||||
// this should correctly escape nested quotes
|
||||
|
||||
Reference in New Issue
Block a user