Skip to content

os/exec: expose a config that allows LookPath and Command to take in relative paths #53962

Closed
@Mark-Jung

Description

@Mark-Jung

With Go 1.19, os/exec no longer accepts relative paths as part of PATH. Reading through https://github.com/golang/go/issues/43724, the suggested workaround is to export the paths as absolute paths.

However, In some build environments (i.e. Bazel), paths to executables that are compiled during build time are passed around as relative paths for hermetic builds.

Would it be possible for Go runtime to expose some type of configuration (maybe via environment variable?) that allows relative path lookups in os/exec?

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions