mirror of
https://github.com/ko-build/ko.git
synced 2025-03-29 21:20:57 +02:00
This change adds a `WorkingDirectory` field to `options.BuildOptions`, but doesn't expose this as a CLI flag. The default zero value means the current working directory. The value is used as the directory for executing `go` tool commands. When embedding ko in other tools, it is sometimes necessary to set the working directory for executing the `go` tool, instead of assuming the current process working directory. An example of where this is required from Skaffold: https://github.com/GoogleContainerTools/skaffold/tree/master/examples/microservices In this example, the working directory doesn't contain either `go.mod` or any Go files. The `skaffold.yaml` configuration file specifies a `context` field for each image, which is the directory where the `go` tool can find package information.