Tolerate spaces in the current working directory (#9)
* Tolerate spaces in the current working directory When $(pwd) evaluates to a string with spaces, the shell parses the resulting arguments for binding Docker volumes incorrectly. Quote these arguments to supply them indivisibly as intended. * whitespacemaster
parent
b24f6ad182
commit
85f5d74317
19
Makefile
19
Makefile
|
@ -84,11 +84,11 @@ bin/$(ARCH)/$(BIN): build-dirs
|
|||
-ti \
|
||||
--rm \
|
||||
-u $$(id -u):$$(id -g) \
|
||||
-v $$(pwd)/.go:/go \
|
||||
-v $$(pwd):/go/src/$(PKG) \
|
||||
-v $$(pwd)/bin/$(ARCH):/go/bin \
|
||||
-v $$(pwd)/bin/$(ARCH):/go/bin/linux_$(ARCH) \
|
||||
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static \
|
||||
-v "$$(pwd)/.go:/go" \
|
||||
-v "$$(pwd):/go/src/$(PKG)" \
|
||||
-v "$$(pwd)/bin/$(ARCH):/go/bin" \
|
||||
-v "$$(pwd)/bin/$(ARCH):/go/bin/$$(go env GOOS)_$(ARCH)" \
|
||||
-v "$$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static" \
|
||||
-w /go/src/$(PKG) \
|
||||
$(BUILD_IMAGE) \
|
||||
/bin/sh -c " \
|
||||
|
@ -133,14 +133,15 @@ test: build-dirs
|
|||
-ti \
|
||||
--rm \
|
||||
-u $$(id -u):$$(id -g) \
|
||||
-v $$(pwd)/.go:/go \
|
||||
-v $$(pwd):/go/src/$(PKG) \
|
||||
-v $$(pwd)/bin/$(ARCH):/go/bin \
|
||||
-v $$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static \
|
||||
-v "$$(pwd)/.go:/go" \
|
||||
-v "$$(pwd):/go/src/$(PKG)" \
|
||||
-v "$$(pwd)/bin/$(ARCH):/go/bin" \
|
||||
-v "$$(pwd)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static" \
|
||||
-w /go/src/$(PKG) \
|
||||
$(BUILD_IMAGE) \
|
||||
/bin/sh -c " \
|
||||
./build/test.sh $(SRC_DIRS) \
|
||||
|
||||
"
|
||||
|
||||
build-dirs:
|
||||
|
|
Loading…
Reference in New Issue