exp/cmd
Johan Jansson b2b84827b7 cmd/txtar: extract only in current dir by default
Change the behavior of txtar so that files are extracted only in the
current directory, or a subdirectory of the current directory, by
default.

If the archive contains a path outside the current directory, txtar will
print an error message and quit with exit code 1. It will not extract
any files in this case. This also applies if an environment variable
used in the archive expands into a path outside the current directory.

Add flag -unsafe to remove the restriction and allow extracting files
outside the current dir.

Updates golang/go#46741

Change-Id: Ic12fb8286c5f2a930addd82dcfce196d4a04054c
Reviewed-on: https://go-review.googlesource.com/c/exp/+/371274
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-16 16:40:55 +00:00
..
apidiff cmd/apidiff: store package path with export data 2019-10-14 17:15:48 +00:00
gorelease cmd/gorelease: explicitly set user.name and user.email in test Git repos 2021-10-29 16:00:41 +00:00
macos-roots-test all: go fmt ./... 2021-02-20 03:29:38 +00:00
modgraphviz modgraphviz: condense graph output 2019-10-24 15:08:12 +00:00
txtar cmd/txtar: extract only in current dir by default 2021-12-16 16:40:55 +00:00