8000 gohack does not allow relative directories in GOHACK env var. · Issue #44 · rogpeppe/gohack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
gohack does not allow relative directories in GOHACK env var. #44
Closed
@davidovich

Description

@davidovich

We want to be able to set GOHACK to a relative dir, say ./. But this is not possible at the moment as the initial ./ is removed in the replace directive, creating a broken replacement line for go:

replacement module without version must be directory path (rooted or starting with ./ or ../)

We can work around the problem by manually prefixing the replacement with ./.

We like the relative path use-case, because it allows enhanced interop in WSL, when the path is on a shared Windows mount (/mnt/c/...), Windows go tools can interpret the same (relative) path as the WSL go tools. With absolute paths, Windows tools obviously cannot interpret the /mnt/c/... mount.

This is somewhat related to #27.

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

      0