Skip to content

Commit ad8ff59

Browse files
committed
🐛 Trim CLI arguments
1 parent 7037081 commit ad8ff59

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

scan/src/utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ function getDeprecatedInputs(args: string[]): string[] {
8989
*/
9090
export function getInputs(): Inputs {
9191
return {
92-
args: getDeprecatedInputs(core.getInput('args').split(',')),
92+
args: getDeprecatedInputs(
93+
core
94+
.getInput('args')
95+
.split(',')
96+
.map(arg => arg.trim())
97+
),
9398
resultsDir: core.getInput('results-dir'),
9499
cacheDir: core.getInput('cache-dir'),
95100
additionalCacheHash: core.getInput('additional-cache-hash'),

vsts/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function getInputs(): Inputs {
2525
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2626
const home = path.join(process.env['AGENT_TEMPDIRECTORY']!!, 'qodana')
2727
return {
28-
args: (tl.getInput('args', false) || '').split(','),
28+
args: (tl.getInput('args', false) || '').split(',').map(arg => arg.trim()),
2929
resultsDir: tl.getInput('resultsDir', false) || path.join(home, 'results'),
3030
cacheDir: tl.getInput('cacheDir', false) || path.join(home, 'cache'),
3131
uploadResult: tl.getBoolInput('uploadResult', false) || true,

0 commit comments

Comments
 (0)