Skip to content

Commit 024aba6

Browse files
authored
support cygwin paths (#9)
* support cygwin paths * add tests
1 parent fb7ad61 commit 024aba6

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ $(GOLANGCI_LINT): $(LOCALBIN)
4646
## Update Tools
4747
.PHONY: update-toolbox-tools
4848
update-toolbox-tools:
49+
@rm -f \
50+
$(LOCALBIN)/semver \
51+
$(LOCALBIN)/golangci-lint
4952
toolbox makefile -f $$(pwd)/Makefile \
5053
github.com/bakito/semver \
5154
github.com/golangci/golangci-lint/cmd/golangci-lint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ toolbox makefile -f ./Makefile \
8484
```Makefile
8585
## toolbox - start
8686
## Location to install dependencies to
87-
LOCALBIN ?= $(shell pwd)/bin
87+
LOCALBIN ?= $(shell test -s "cygpath -m $$(pwd)" || pwd)/bin
8888
$(LOCALBIN):
8989
mkdir -p $(LOCALBIN)
9090

pkg/makefile/consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const (
55
markerEnd = "## toolbox - end"
66
makefileTemplate = markerStart + `
77
## Location to install dependencies to
8-
LOCALBIN ?= $(shell pwd)/bin
8+
LOCALBIN ?= $(shell test -s "cygpath -m $$(pwd)" || pwd)/bin
99
$(LOCALBIN):
1010
mkdir -p $(LOCALBIN)
1111

testdata/Makefile.content.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## toolbox - start
44
## Location to install dependencies to
5-
LOCALBIN ?= $(shell pwd)/bin
5+
LOCALBIN ?= $(shell test -s "cygpath -m $$(pwd)" || pwd)/bin
66
$(LOCALBIN):
77
mkdir -p $(LOCALBIN)
88

testdata/Makefile.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## toolbox - start
22
## Location to install dependencies to
3-
LOCALBIN ?= $(shell pwd)/bin
3+
LOCALBIN ?= $(shell test -s "cygpath -m $$(pwd)" || pwd)/bin
44
$(LOCALBIN):
55
mkdir -p $(LOCALBIN)
66

0 commit comments

Comments
 (0)