Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable setting the working dir for the go tool #365

Merged
merged 1 commit into from
Jun 10, 2021

Commits on Jun 10, 2021

  1. Enable setting the working dir for the go tool

    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.
    halvards committed Jun 10, 2021
    Configuration menu
    Copy the full SHA
    340b04d View commit details
    Browse the repository at this point in the history