Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d3e567b

Browse files
authored
Do not override the KO_DOCKER_REPO if is set (#14)
1 parent 344999d commit d3e567b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/artifact/ko_publish.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ func (kp KoPublisher) Publish(artifact config.Artifact, notifier config.Notifier
6868

6969
func (kp KoPublisher) publishOptions() (*options.PublishOptions, error) {
7070
if v, ok := os.LookupEnv(magetasksImageBasename); ok {
71-
if err := os.Setenv(koDockerRepo, v); err != nil {
72-
return nil, err
71+
if _, ok2 := os.LookupEnv(koDockerRepo); !ok2 {
72+
if err := os.Setenv(koDockerRepo, v); err != nil {
73+
return nil, err
74+
}
7375
}
7476
}
7577
opts := &options.PublishOptions{

0 commit comments

Comments
 (0)