Skip to content

Commit

Permalink
Let temporary untar dirs start with a dot
Browse files Browse the repository at this point in the history
So that they are ignored by the Go tooling. Otherwise, when building in
parallel, Go may try to treat these temporary directories as Go package
folders and fail utterly.

https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns

> Directory and file names that begin with "." or "_" are ignored by the
> go tool, as are directories named "testdata".

Fixes: d68dc34 ("Improve Docker export in embedded-binaries Makefile")
Signed-off-by: Tom Wieczorek <[email protected]>
  • Loading branch information
twz123 committed May 24, 2024
1 parent cbdc123 commit db51280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion embedded-bins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $(bindir)/kubelet.exe $(bindir)/kube-proxy.exe: .container.kubernetes.windows
$(bindir)/containerd.exe $(bindir)/containerd-shim-runhcs-v1.exe: .container.containerd.windows

$(addprefix $(bindir)/, $(bins)): | $(bindir)
tardir=$$(mktemp -d -- '$(notdir $@).XXXXXX.tmp') \
tardir=$$(mktemp -d -- '.$(notdir $@).XXXXXX.tmp') \
&& trap "rm -rf -- $$tardir" INT EXIT \
&& docker export "$$(cat $<)" \
| tar -C "$$tardir" -x bin/$(notdir $@) \
Expand Down

0 comments on commit db51280

Please sign in to comment.