Skip to content

Cannot install from source due to replace directive #282

@Fryuni

Description

@Fryuni

Installing a module-aware binary without modules has been blocked since Go 1.13 if I remember correctly.

❯ go install -u github.com/cube2222/octosql
flag provided but not defined: -u
usage: go install [build flags] [packages]
Run 'go help install' for details.
❯ go install github.com/cube2222/octosql    
no required module provides package github.com/cube2222/octosql; to add it:
        go get github.com/cube2222/octosql

The suggested command downloads the source but doesn't build it.

Replacing that with the new command using module installation (with a version) also does not work because replace directives are not supported with the install command.

❯ go install github.com/cube2222/octosql@latest
go: github.com/cube2222/octosql@latest (in github.com/cube2222/[email protected]):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

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