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