Trim arguments after splitting them (#791)

* Trim arguments after splitting them

* Test functionality

* Update buildExec.test.ts

* Use `toMatchObject` instead of `toEqual`

* Use `expect.arrayContaining`

* Update buildExec.test.ts

* Debug `execArgs`

* Build project

* Add `verbose` guard

* Build project
This commit is contained in:
Mitchell Borrego
2022-07-26 12:43:41 -04:00
committed by GitHub
parent 68d5f6d0be
commit 5c0da1b28f
4 changed files with 1475 additions and 313 deletions

View File

@@ -91,7 +91,7 @@ const buildExec = () => {
execArgs.push('-e', envVarsArg.join(','));
}
if (functionalities) {
functionalities.split(',').forEach((f) => {
functionalities.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-X', `${f}`);
});
}
@@ -102,12 +102,12 @@ const buildExec = () => {
execArgs.push('-f', `${file}`);
}
if (files) {
files.split(',').forEach((f) => {
files.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-f', `${f}`);
});
}
if (flags) {
flags.split(',').forEach((f) => {
flags.split(',').map((f) => f.trim()).forEach((f) => {
execArgs.push('-F', `${f}`);
});
}
@@ -176,6 +176,10 @@ const buildExec = () => {
uploaderVersion = 'latest';
}
if (verbose) {
console.debug({execArgs});
}
return {execArgs, options, failCi, os, uploaderVersion, verbose};
};