1
0
mirror of https://github.com/ko-build/ko.git synced 2025-07-12 23:50:31 +02:00

Use signal.NotifyContext and cmd.Context (#482)

This commit is contained in:
Jason Hall
2021-11-02 17:15:25 -04:00
committed by GitHub
parent b1c35d29f5
commit 1e46fdebd5
9 changed files with 22 additions and 37 deletions

View File

@ -70,9 +70,7 @@ func addCreate(topLevel *cobra.Command) {
if !isKubectlAvailable() {
return errors.New("error: kubectl is not available. kubectl must be installed to use ko create")
}
// Cancel on signals.
ctx := createCancellableContext()
ctx := cmd.Context()
bo.InsecureRegistry = po.InsecureRegistry
builder, err := makeBuilder(ctx, bo)