Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Makefile: Fix setting PATH
Browse files Browse the repository at this point in the history
Running `sudo -E PATH=... foo` doesn't actually use the provided PATH to
lookup foo, it just sets PATH before execing the foo found by sudo
(which doesn't look in the provided PATH).

Signed-off-by: Lewis Marshall <lewis@lmars.net>
  • Loading branch information
lmars authored and titanous committed Jul 16, 2017
1 parent 5ef7b50 commit 86f037b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -12,10 +12,10 @@ clean:
test: test-unit test-integration

test-unit: build
$(GO_ENV) PATH=${PWD}/build/bin:${PATH} go test -race -cover ./...
env $(GO_ENV) PATH=${PWD}/build/bin:${PATH} go test -race -cover ./...

test-unit-root: test-unit
sudo -E $(GO_ENV) PATH=${PWD}/build/bin:${PATH} go test -race -cover ./host/volume/...
sudo -E env $(GO_ENV) PATH=${PWD}/build/bin:${PATH} go test -race -cover ./host/volume/...

test-integration: build
script/run-integration-tests
Expand Down

0 comments on commit 86f037b

Please sign in to comment.