Bug 258359 - Mk/Uses/go.mk: fix gomod-clean target for case when lang/go is not installed
Summary: Mk/Uses/go.mk: fix gomod-clean target for case when lang/go is not installed
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Guangyuan Yang
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2021-09-08 04:06 UTC by Mel Pilgrim
Modified: 2021-09-23 02:13 UTC (History)
1 user (show)

See Also:
koobs: merge-quarterly?


Attachments
Fix gomod-clean target for case when go is not installed (405 bytes, text/plain)
2021-09-08 04:06 UTC, Mel Pilgrim
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mel Pilgrim 2021-09-08 04:06:33 UTC
Created attachment 227753 [details]
Fix gomod-clean target for case when go is not installed

Mk/Uses/go.mk breaks cleaning targets if go is not installed:

# make distclean
===> benchmarks/hey
===>  Cleaning for hey-0.1.4_1
===>  Cleaning Go module cache
env: /usr/local/bin/go: No such file or directory
*** Error code 127

Suggested fix: wrap the "go clean -modules" command with a test that will silently fail if go is not installed.
Comment 1 Mel Pilgrim 2021-09-21 11:21:40 UTC
It's been two weeks, so maintainer timeout I guess.