Skip to content

Commit

Permalink
Check entrypoint array for emptyness
Browse files Browse the repository at this point in the history
The entrypoint array of BuildahConfigSettings might be empty. It makes
no sense to push the `--entrypoint` argument then, thus breaking the
`convertArrayToStringArg` method.

Closes redhat-actions#136
  • Loading branch information
picsel2 committed Apr 26, 2024
1 parent 7a95fa7 commit fdef902
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/buildah.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class BuildahCli implements Buildah {
core.debug("config");
core.debug(container);
const args: string[] = [ "config" ];
if (settings.entrypoint) {
if (settings.entrypoint && settings.entrypoint.length > 0) {
args.push("--entrypoint");
args.push(BuildahCli.convertArrayToStringArg(settings.entrypoint));
}
Expand Down

0 comments on commit fdef902

Please sign in to comment.