Skip to content

Commit 56b90f6

Browse files
committed
make: Create golangci-lint cache dir if necessary
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent 7f4ed82 commit 56b90f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ else
1010
RUNNER=podman
1111
endif
1212

13-
# if the golangci-lint steps fails with the following error message:
13+
# if the golangci-lint steps fails with one of the following error messages:
1414
#
1515
# directory prefix . does not contain main module or its selected dependencies
1616
#
17+
# failed to initialize build cache at /root/.cache/golangci-lint: mkdir /root/.cache/golangci-lint: permission denied
18+
#
1719
# you probably have to fix the SELinux security context for root directory plus your cache
1820
#
1921
# chcon -Rt svirt_sandbox_file_t .
2022
# chcon -Rt svirt_sandbox_file_t ~/.cache/golangci-lint
2123
lint:
24+
mkdir -p ~/.cache/golangci-lint/$(GOLANGCI_LINT_VERSION)
2225
$(RUNNER) run -t --rm \
2326
-v $(shell pwd):/app \
2427
-v ~/.cache/golangci-lint/$(GOLANGCI_LINT_VERSION):/root/.cache \

0 commit comments

Comments
 (0)