Skip to content

Commit 6a414f0

Browse files
authored
cmd/testscript: document -work flag in help and README (#123)
1 parent ac050e5 commit 6a414f0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cmd/testscript/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ The testscript command runs github.com/rogpeppe/go-internal/testscript scripts
33
in a fresh temporary work directory tree.
44
55
Usage:
6-
testscript [-v] [-e VAR[=value]]... [-u] files...
6+
testscript [-v] [-e VAR[=value]]... [-u] [-work] files...
77
88
The testscript command is designed to make it easy to create self-contained
99
reproductions of command sequences.
@@ -31,6 +31,9 @@ succeed and the testscript file will be updated to reflect the actual content.
3131
As such, this is the cmd/testcript equivalent of
3232
testscript.Params.UpdateScripts.
3333
34+
The -work flag prints the temporary work directory path before running each
35+
script, and does not remove that directory when testscript exits.
36+
3437
Examples
3538
========
3639

cmd/testscript/help.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The testscript command runs github.com/rogpeppe/go-internal/testscript scripts
1414
in a fresh temporary work directory tree.
1515
1616
Usage:
17-
testscript [-v] [-e VAR[=value]]... [-u] files...
17+
testscript [-v] [-e VAR[=value]]... [-u] [-work] files...
1818
1919
The testscript command is designed to make it easy to create self-contained
2020
reproductions of command sequences.
@@ -42,6 +42,9 @@ succeed and the testscript file will be updated to reflect the actual content.
4242
As such, this is the cmd/testcript equivalent of
4343
testscript.Params.UpdateScripts.
4444
45+
The -work flag prints the temporary work directory path before running each
46+
script, and does not remove that directory when testscript exits.
47+
4548
Examples
4649
========
4750

0 commit comments

Comments
 (0)