Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions packages/cli-kit/src/public/node/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ function parseCommand(command: string): string[] {
for (const char of command) {
if (inQuote) {
if (char === inQuote) {
// End of quoted section
inQuote = null
} else {
current += char
}
} else if (char === '"' || char === "'") {
// Start of quoted section
continue
}

if (char === '"' || char === "'") {
inQuote = char
} else if (char === ' ' || char === '\t') {
// Whitespace outside quotes - end current token
if (current) {
result.push(current)
current = ''
Expand All @@ -158,7 +158,6 @@ function parseCommand(command: string): string[] {
}
}

// Don't forget the last token
if (current) {
result.push(current)
}
Expand Down
Loading