config override

This commit is contained in:
Aman Singh
2022-11-04 19:49:25 +05:30
parent 1bee1629c2
commit 48f6e72954
+2 -1
View File
@@ -201,9 +201,10 @@ func main() {
func run(c *cli.Context) error {
username := c.String("username")
noPush := c.Bool("no-push")
configOverride := c.Bool("dockerconfig-override")
// only setup auth when pushing or credentials are defined and docker config override is false
if (!noPush || username != "") && !c.Bool("dockerconfig-override") {
if (!noPush || username != "") && !configOverride {
if err := createDockerCfgFile(username, c.String("password"), c.String("registry")); err != nil {
return err
}