1
0
mirror of https://github.com/ko-build/ko.git synced 2025-07-15 23:54:17 +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

@ -49,7 +49,7 @@ func addRun(topLevel *cobra.Command) {
# You can also supply args and flags to the command.
ko run ./cmd/baz -- -v arg1 arg2 --yes`,
RunE: func(cmd *cobra.Command, args []string) error {
ctx := createCancellableContext()
ctx := cmd.Context()
// Args after -- are for kubectl, so only consider importPaths before it.
importPaths := args