mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-06-08 01:49:03 +00:00
fixed issue with multiple args for entrypoint
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
This commit is contained in:
parent
69952a8f62
commit
652179bd8c
4 changed files with 19 additions and 5 deletions
|
@ -59,7 +59,7 @@ export class BuildahCli implements Buildah {
|
|||
const args: string[] = ['config'];
|
||||
if (settings.entrypoint) {
|
||||
args.push('--entrypoint');
|
||||
args.push(...settings.entrypoint);
|
||||
args.push(this.convertArrayToStringArg(settings.entrypoint));
|
||||
}
|
||||
if (settings.port) {
|
||||
args.push('--port');
|
||||
|
@ -76,6 +76,13 @@ export class BuildahCli implements Buildah {
|
|||
return await this.execute(args);
|
||||
}
|
||||
|
||||
private convertArrayToStringArg(args: string[]): string {
|
||||
let arrayAsString = '[';
|
||||
args.forEach(arg => {
|
||||
arrayAsString += `"${arg}",`;
|
||||
});
|
||||
return `${arrayAsString.slice(0, -1)}]`;
|
||||
}
|
||||
|
||||
private async execute(args: string[]): Promise<CommandResult> {
|
||||
if (!this.executable) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue