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

Commit

Permalink
Do not override the KO_DOCKER_REPO if is set (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil authored Oct 14, 2021
1 parent 344999d commit d3e567b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/artifact/ko_publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ func (kp KoPublisher) Publish(artifact config.Artifact, notifier config.Notifier

func (kp KoPublisher) publishOptions() (*options.PublishOptions, error) {
if v, ok := os.LookupEnv(magetasksImageBasename); ok {
if err := os.Setenv(koDockerRepo, v); err != nil {
return nil, err
if _, ok2 := os.LookupEnv(koDockerRepo); !ok2 {
if err := os.Setenv(koDockerRepo, v); err != nil {
return nil, err
}
}
}
opts := &options.PublishOptions{
Expand Down

0 comments on commit d3e567b

Please sign in to comment.