Throw an error when both 'platform' and 'arch' options are supplied during a build

This commit is contained in:
James Addison 2021-10-10 17:47:51 +01:00
parent a69800dc4e
commit b88e8e76cb

View file

@ -186,6 +186,10 @@ export class BuildahCli implements Buildah {
): Promise<CommandResult> { ): Promise<CommandResult> {
// ghCore.info(`${EXECUTABLE} ${args.join(" ")}`) // ghCore.info(`${EXECUTABLE} ${args.join(" ")}`)
if (args.arch && args.platform) {
throw new Error("The --platform option may not be used in combination with the --arch option.");
}
let stdout = ""; let stdout = "";
let stderr = ""; let stderr = "";