]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix swigOne action with -n
authorAustin Clements <austin@google.com>
Sat, 6 May 2023 19:27:02 +0000 (15:27 -0400)
committerAustin Clements <austin@google.com>
Fri, 12 May 2023 12:00:04 +0000 (12:00 +0000)
commit711609d55f7d1254e0400fd870c97d5c5a259a99
tree4a13d10b398592f16de72af56785d4557ff3b229
parenta3f69c778fa6c082d38f9cdfacab27714f08a343
cmd/go: fix swigOne action with -n

Currently, if cmd/go builds a swig file with the -n (dry run) flag, it
will print the swig command invocation without executing it, but then
attempt to actually rename one of swig's output files, which will
fail. Make this rename conditional on -n. While we're here, we fix the
missing logging of the rename command with -x, too.

Change-Id: I1f6e6efc53dfe4ac5a42d26096679b97bc322827
Reviewed-on: https://go-review.googlesource.com/c/go/+/493255
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/work/exec.go