Skip to content

Commit d98851f

Browse files
authored
common.mk: fix clean target to remove binaries, not source directories (#183)
The clean target was using 'rm -rf ./cmd/$(APP)' which deletes the entire source directory. Since 'go build ./cmd/$(APP)' outputs the binary to the current directory (not into cmd/), clean should remove './$(APP)' instead. This prevents accidental deletion of customized cmd/ files (like the streaming example's http.go with pingPonger).
1 parent 6515582 commit d98851f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ build:
7070
@go build "./cmd/$(APP)" && go build "./cmd/$(APP)-cli"
7171

7272
clean:
73-
@rm -rf "./cmd/$(APP)" "./cmd/$(APP)-cli"
73+
@rm -f "./$(APP)" "./$(APP)-cli"
7474

7575
test:
7676
@echo TESTING...

0 commit comments

Comments
 (0)