fix: args is not iterable
This commit is contained in:
parent
b4405eb7db
commit
4d754673e7
|
@ -13,19 +13,21 @@ export const joinCommand = (path, args = [], emptyContent = '-') => {
|
||||||
if (!isEmpty(path)) {
|
if (!isEmpty(path)) {
|
||||||
let containValuePlaceholder = false
|
let containValuePlaceholder = false
|
||||||
cmd = includes(path, ' ') ? `"${path}"` : path
|
cmd = includes(path, ' ') ? `"${path}"` : path
|
||||||
for (let part of args) {
|
if (args) {
|
||||||
part = trim(part)
|
for (let part of args) {
|
||||||
if (isEmpty(part)) {
|
part = trim(part)
|
||||||
continue
|
if (isEmpty(part)) {
|
||||||
}
|
continue
|
||||||
if (includes(part, ' ')) {
|
}
|
||||||
cmd += ' "' + part + '"'
|
if (includes(part, ' ')) {
|
||||||
} else {
|
cmd += ' "' + part + '"'
|
||||||
if (toUpper(part) === '{VALUE}') {
|
} else {
|
||||||
part = '{VALUE}'
|
if (toUpper(part) === '{VALUE}') {
|
||||||
containValuePlaceholder = true
|
part = '{VALUE}'
|
||||||
|
containValuePlaceholder = true
|
||||||
|
}
|
||||||
|
cmd += ' ' + part
|
||||||
}
|
}
|
||||||
cmd += ' ' + part
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!containValuePlaceholder) {
|
if (!containValuePlaceholder) {
|
||||||
|
|
Loading…
Reference in New Issue