Skip to content

Commit

Permalink
Merge pull request #65 from demisto/sk_fix_run_command
Browse files Browse the repository at this point in the history
Fix Run And Debug To Run Commands With Arguments in XSOAR
  • Loading branch information
shmuel44 authored Feb 10, 2025
2 parents 6e799ec + bb091bb commit 21abd8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Change Log

# Unreleased
- Fixed an issue where the **Run And Debug** command failed to execute properly when running commands with arguments in XSOAR.

# [0.7.4] (2024-11-26)

Expand Down
4 changes: 2 additions & 2 deletions src/runAndDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ function argumentSorted(_list: vscode.QuickPickItem[]): vscode.QuickPickItem[] {
}

function runCommand(query: Map<string, string>) {
let cmd = `"${query.get('cmd')}`
let cmd = `${query.get('cmd')}`
if (typeof cmd === 'string') {
query.delete('cmd')
const queryTest = Array.from(query.entries())
queryTest.map((arg: [string, string]) => {
cmd += ` ${arg[0]}=${arg[1]}`
})
const q: string[] = ['run', '-q', cmd + `"`]
const q: string[] = ['run', '-q', cmd]
TerminalManager.sendDemistoSDKCommand(q);
}
}
Expand Down

0 comments on commit 21abd8b

Please sign in to comment.