Skip to content

Commit

Permalink
ui: fix docker and podman login command for windows (PROJQUAY-6648) (q…
Browse files Browse the repository at this point in the history
  • Loading branch information
netsandbox authored and Sunandadadi committed Mar 5, 2024
1 parent 3fea26c commit 5629daf
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions static/js/directives/ui/credentials-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,25 +129,15 @@ angular.module('quay').directive('credentialsDialog', function () {
return '';
}

var escape = function(v) {
if (!v) { return v; }
return v.replace('$', '\\$');
};

return 'docker login -u="' + escape(credentials.username) + '" -p="' + credentials.password + '" ' + Config['SERVER_HOSTNAME'];
return 'docker login -u=\'' + credentials.username + '\' -p=\'' + credentials.password + '\' ' + Config['SERVER_HOSTNAME'];
};

$scope.getPodmanLogin = function(credentials) {
if (!credentials || !credentials.username) {
return '';
}

var escape = function(v) {
if (!v) { return v; }
return v.replace('$', '\\$');
};

return 'podman login -u="' + escape(credentials.username) + '" -p="' + credentials.password + '" ' + Config['SERVER_HOSTNAME'];
return 'podman login -u=\'' + credentials.username + '\' -p=\'' + credentials.password + '\' ' + Config['SERVER_HOSTNAME'];
};

$scope.getDockerFilename = function(credentials) {
Expand Down

0 comments on commit 5629daf

Please sign in to comment.