Skip to content

Give cmd exec commands only the environment variables it needs #5

@nhh

Description

@nhh

Also maybe, configure the ni-dev-defra context with this mechanism and avoid errors based on wrong env configuration.

cmd := exec.Command("ansible-playbook", args...)
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, "MY_VAR=some_value")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions