Skip to content

Installation of v.0.40.0 fails with go install #2885

@cdillond

Description

@cdillond

Describe the bug
Installation of lazygit v0.40.0 using go install fails due to a replace directive in the go.mod file.

To Reproduce
Steps to reproduce the behavior:

  1. Run go install github.com/jesseduffield/lazygit@latest
  2. When I do this, the following message appears:
go: github.com/jesseduffield/lazygit@latest (in github.com/jesseduffield/[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.

Expected behavior
I expected lazygit to install successfully.

Version info:
I was able to avoid the issue by running go install github.com/jesseduffield/[email protected] instead.

Additional context
Per the Go docs (and this other github issue), go install doesn't work with replace directives.

I think this might be the source of the problem.
replace github.com/gdamore/tcell/v2 v2.6.0 => github.com/stefanhaller/tcell/v2 v2.6.16

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions