Skip to content

Ensure exec.Cmd.Path and exec.Cmd.Args[0] consistency #174

Description

@karolz-ms

Create a factory function for exec.Cmd so that we do not have to do the following all over the codebase

cmd := exec.Command("docker", args...)
// exec.Command resolves cmd.Path via LookPath but leaves cmd.Args[0] as
// the original "docker" string. Align Args[0] with the resolved Path so
// downstream consumers and child-process
// argv[0] observers see a consistent, fully-qualified command name.
if cmd.Path != "" {
	cmd.Args[0] = cmd.Path
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    reliabilityIssue makes DCP unreliable

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions