Skip to content

Commit

Permalink
fix logic to read acr from image name (#20)
Browse files Browse the repository at this point in the history
Co-authored-by: Kanika Pasrija <58769601+kanika1894@users.noreply.github.com>
  • Loading branch information
waqassiddiqi and kanika1894 committed May 7, 2021
1 parent 2316832 commit bcb0a1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/taskparameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class TaskParameters {
this._registryLoginServer = core.getInput('registry-login-server');
if (!this._registryLoginServer) {
// If the user doesn't give registry login server and the registry is ACR
let imageList = this._registryLoginServer.split('/');
let imageList = this._image.split('/');
if (imageList[0].indexOf('azurecr') > -1) {
this._registryLoginServer = imageList[0];
}
Expand Down Expand Up @@ -277,4 +277,4 @@ class TaskParameters {
return this._subscriptionId;
}
}
exports.TaskParameters = TaskParameters;
exports.TaskParameters = TaskParameters;
2 changes: 1 addition & 1 deletion src/taskparameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class TaskParameters {
this._registryLoginServer = core.getInput('registry-login-server');
if(!this._registryLoginServer) {
// If the user doesn't give registry login server and the registry is ACR
let imageList = this._registryLoginServer.split('/');
let imageList = this._image.split('/');
if(imageList[0].indexOf('azurecr') > -1) {
this._registryLoginServer = imageList[0];
}
Expand Down

0 comments on commit bcb0a1c

Please sign in to comment.