summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJames O'Doherty <james@theodohertyfamily.com>2026-05-29 19:21:49 -0400
committerJames O'Doherty <james@theodohertyfamily.com>2026-05-29 19:21:49 -0400
commit70096b533d42b684ab13651aaae884047e01e43d (patch)
tree2646cf017a7b903c6e1f3c1be981b1d21fa4a51b /Makefile
parent284ed362550e1fccc62ecd876dbd3f4c8fc721e2 (diff)
refactor: optimize file cleanups, propagate exit codes, and fix Makefile
- Unlink the temporary bootstrap launcher binary immediately after opening a read-only descriptor to it, then execute via `/proc/self/fd/<fd>` to ensure zero-disk footprint on execution. - Unlink temporary `/tmp/resolvconf*` files immediately after successful bind-mounting over `/etc/resolv.conf`. - Prune parent ephemeral profile directories when unpinning a namespace, leaving zero directories behind once empty. - Propagate the exact exit status of the wrapped command to the host process using `errors.As` and `*exec.ExitError` instead of defaulting to exit code 1. - Added E2E automated test `TestExitCodePropagation` to verify exit status delivery. - Added the `$(BINARY)` target to `.PHONY` in the Makefile to delegate dependency tracking to Go's compiler cache, ensuring modified Go files are rebuilt during `make test`.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index dc57dfa..0597d84 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ BINARY = wg-wrap
FUZZ_PARALLEL ?= 2
FUZZ_TIME ?= 30s
-.PHONY: all clean test fuzz
+.PHONY: all clean test fuzz $(BINARY)
# Default target: build the final binary
all: $(BINARY)