Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/subCommands/deploy/impl/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,24 +166,22 @@ export default class Service extends Base {
throw new Error('CustomContainerRuntime must have a valid image URL');
}
if (Acr.isAcrRegistry(image)) {
const isExist = await this._getAcr().checkAcr(image);
if (!isExist) {
if (this.skipPush) {
if (_.isEmpty(diffResult)) {
this.needDeploy = true;
return;
}
} else {
// eslint-disable-next-line no-lonely-if
if (!this.skipPush) {
tipsMsg = yellow(
`WARNING: You are pushing ${image} to overwrite an existing image tag.If this image tag is being used by any other functions, subsequent calls to these functions may fail.Please confirm if you want to continue.`,
);
} else {
// eslint-disable-next-line no-lonely-if
const isExist = await this._getAcr().checkAcr(image);
if (!isExist) {
if (_.isEmpty(diffResult)) {
this.needDeploy = true;
return;
}
} else {
tipsMsg = yellow(
`WARNING: You are pushing ${image} to overwrite an existing image tag.If this image tag is being used by any other functions, subsequent calls to these functions may fail.Please confirm if you want to continue.`,
);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/subCommands/remove/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class Remove {
if (!this.functionName) {
// throw new Error('Function name not specified, please specify --function-name');
logger.error('Function name not specified, please specify --function-name');
this.functionName = "undefined_placeholder"
this.functionName = 'undefined_placeholder_not_exist_123456789';
}

if (removeAll || needRemoveFunction === true) {
Expand Down
Loading