fix(benchmark): Fix args formatting & validate scaling mode env vars (#10766)

Co-authored-by: Cornelius Suermann <cornelius@n8n.io>
This commit is contained in:
Tomi Turtiainen
2024-09-11 11:12:03 +03:00
committed by GitHub
parent bf43d67357
commit b9d157db40
2 changed files with 15 additions and 1 deletions

View File

@@ -10,5 +10,11 @@
export function flagsObjectToCliArgs(flags) {
return Object.entries(flags)
.filter(([, value]) => value !== undefined)
.map(([key, value]) => `--${key}=${value}`);
.map(([key, value]) => {
if (typeof value === 'string' && value.includes(' ')) {
return `--${key}="${value}"`;
} else {
return `--${key}=${value}`;
}
});
}