fix: registry prompt result being ignored (#1268)

* fix: registry prompt result being ignored

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2022-09-21 06:28:09 +02:00 committed by GitHub
parent 74b57c2a65
commit dfff8aa00a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -167,10 +167,15 @@ func runBuild(cmd *cobra.Command, _ []string, newClient ClientFactory) (err erro
NewRegistryValidator(config.Path))); err != nil {
return ErrRegistryRequired
}
done()
client, done = newClient(ClientConfig{Verbose: config.Verbose},
fn.WithRegistry(config.Registry),
fn.WithBuilder(builder))
defer done()
fmt.Println("Note: building a function the first time will take longer than subsequent builds")
} else {
return ErrRegistryRequired
}
return ErrRegistryRequired
}
// This preemptive write call will be unnecessary when the API is updated