mirror of
https://github.com/ko-build/ko.git
synced 2025-07-15 23:54:17 +02:00
Add ctx everywhere (#268)
* Add ctx to publish.Interface I noticed that hitting ctrl-C didn't work when pushing images, this should fix that. * Use context everywhere that makes sense
This commit is contained in:
@ -56,7 +56,8 @@ func addResolve(topLevel *cobra.Command) {
|
||||
ko resolve --local -f config/`,
|
||||
Args: cobra.NoArgs,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
builder, err := makeBuilder(bo)
|
||||
ctx := createCancellableContext()
|
||||
builder, err := makeBuilder(ctx, bo)
|
||||
if err != nil {
|
||||
log.Fatalf("error creating builder: %v", err)
|
||||
}
|
||||
@ -65,7 +66,6 @@ func addResolve(topLevel *cobra.Command) {
|
||||
log.Fatalf("error creating publisher: %v", err)
|
||||
}
|
||||
defer publisher.Close()
|
||||
ctx := createCancellableContext()
|
||||
if err := resolveFilesToWriter(ctx, builder, publisher, fo, so, sto, os.Stdout); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user