Merge "v.io/jiri/runutil: remove dry run support."
diff --git a/gitutil/git.go b/gitutil/git.go
index c6a6675..985017f 100644
--- a/gitutil/git.go
+++ b/gitutil/git.go
@@ -212,7 +212,7 @@
 // Committers returns a list of committers for the current repository
 // along with the number of their commits.
 func (g *Git) Committers() ([]string, error) {
-	out, err := g.runOutputNoDryRun("shortlog", "-s", "-n", "-e")
+	out, err := g.runOutput("shortlog", "-s", "-n", "-e")
 	if err != nil {
 		return nil, err
 	}
@@ -227,7 +227,7 @@
 		args = append(args, "^"+base)
 	}
 	args = append(args, "--")
-	out, err := g.runOutputNoDryRun(args...)
+	out, err := g.runOutput(args...)
 	if err != nil {
 		return 0, err
 	}
@@ -260,7 +260,7 @@
 
 // CurrentBranchName returns the name of the current branch.
 func (g *Git) CurrentBranchName() (string, error) {
-	out, err := g.runOutputNoDryRun("rev-parse", "--abbrev-ref", "HEAD")
+	out, err := g.runOutput("rev-parse", "--abbrev-ref", "HEAD")
 	if err != nil {
 		return "", err
 	}
@@ -277,7 +277,7 @@
 
 // CurrentRevisionOfBranch returns the current revision of the given branch.
 func (g *Git) CurrentRevisionOfBranch(branch string) (string, error) {
-	out, err := g.runOutputNoDryRun("rev-parse", branch)
+	out, err := g.runOutput("rev-parse", branch)
 	if err != nil {
 		return "", err
 	}
@@ -336,7 +336,7 @@
 // (e.g. --merged).
 func (g *Git) GetBranches(args ...string) ([]string, string, error) {
 	args = append([]string{"branch"}, args...)
-	out, err := g.runOutputNoDryRun(args...)
+	out, err := g.runOutput(args...)
 	if err != nil {
 		return nil, "", err
 	}
@@ -555,7 +555,7 @@
 // RemoteUrl gets the url of the remote with the given name.
 func (g *Git) RemoteUrl(name string) (string, error) {
 	configKey := fmt.Sprintf("remote.%s.url", name)
-	out, err := g.runOutputNoDryRun("config", "--get", configKey)
+	out, err := g.runOutput("config", "--get", configKey)
 	if err != nil {
 		return "", err
 	}
@@ -630,7 +630,7 @@
 // TopLevel returns the top level path of the current repository.
 func (g *Git) TopLevel() (string, error) {
 	// TODO(sadovsky): If g.rootDir is set, perhaps simply return that?
-	out, err := g.runOutputNoDryRun("rev-parse", "--show-toplevel")
+	out, err := g.runOutput("rev-parse", "--show-toplevel")
 	if err != nil {
 		return "", err
 	}
@@ -657,7 +657,7 @@
 
 // Version returns the major and minor git version.
 func (g *Git) Version() (int, int, error) {
-	out, err := g.runOutputNoDryRun("version")
+	out, err := g.runOutput("version")
 	if err != nil {
 		return 0, 0, err
 	}
@@ -709,21 +709,6 @@
 	return trimOutput(stdout.String()), nil
 }
 
-func (g *Git) runOutputNoDryRun(args ...string) ([]string, error) {
-	var stdout, stderr bytes.Buffer
-	fn := func(s runutil.Sequence) runutil.Sequence {
-		dryrun, _ := s.RunOpts()
-		if dryrun {
-			return s.DryRun(false).Verbose(true).Capture(&stdout, &stderr)
-		}
-		return s.Capture(&stdout, &stderr)
-	}
-	if err := g.runWithFn(fn, args...); err != nil {
-		return nil, Error(stdout.String(), stderr.String(), args...)
-	}
-	return trimOutput(stdout.String()), nil
-}
-
 func (g *Git) runInteractive(args ...string) error {
 	var stderr bytes.Buffer
 	// In order for the editing to work correctly with
diff --git a/runutil/.api b/runutil/.api
index e24cb58..4f9083e 100644
--- a/runutil/.api
+++ b/runutil/.api
@@ -20,7 +20,6 @@
 pkg runutil, method (Sequence) Create(string) (*os.File, error)
 pkg runutil, method (Sequence) Dir(string) Sequence
 pkg runutil, method (Sequence) Done() error
-pkg runutil, method (Sequence) DryRun(bool) Sequence
 pkg runutil, method (Sequence) Env(map[string]string) Sequence
 pkg runutil, method (Sequence) Error() error
 pkg runutil, method (Sequence) Fprintf(io.Writer, string, ...interface{}) Sequence
diff --git a/runutil/executor.go b/runutil/executor.go
index 69fd5a9..c8cebce 100644
--- a/runutil/executor.go
+++ b/runutil/executor.go
@@ -25,7 +25,6 @@
 type opts struct {
 	color   bool
 	dir     string
-	dryRun  bool
 	env     map[string]string
 	stdin   io.Reader
 	stdout  io.Writer
@@ -38,7 +37,7 @@
 	opts   opts
 }
 
-func newExecutor(env map[string]string, stdin io.Reader, stdout, stderr io.Writer, color, dryRun, verbose bool) *executor {
+func newExecutor(env map[string]string, stdin io.Reader, stdout, stderr io.Writer, color, verbose bool) *executor {
 	if color {
 		term := os.Getenv("TERM")
 		switch term {
@@ -50,7 +49,6 @@
 		indent: 0,
 		opts: opts{
 			color:   color,
-			dryRun:  dryRun,
 			env:     env,
 			stdin:   stdin,
 			stdout:  stdout,
@@ -115,28 +113,8 @@
 }
 
 // call executes the given Go standard library function,
-// encapsulated as a closure, respecting the "dry run" option.
+// encapsulated as a closure.
 func (e *executor) call(fn func() error, format string, args ...interface{}) error {
-	if opts := e.opts; opts.dryRun {
-		opts.verbose = true
-		return e.function(opts, func() error { return nil }, format, args...)
-	}
-	return e.function(e.opts, fn, format, args...)
-}
-
-// alwaysRun executes the given Go standard library function, encapsulated as a
-// closure, but translating "dry run" into "verbose" for this particular
-// command so that the command can execute and thus allow subsequent
-// commands to complete. It is generally used for testing/making files/directories
-// that affect subsequent behaviour.
-func (e *executor) alwaysRun(fn func() error, format string, args ...interface{}) error {
-	if opts := e.opts; opts.dryRun {
-		// Disable the dry run option as this function has no effect and
-		// doing so results in more informative "dry run" output.
-		opts.dryRun = false
-		opts.verbose = true
-		return e.function(opts, fn, format, args...)
-	}
 	return e.function(e.opts, fn, format, args...)
 }
 
@@ -168,7 +146,7 @@
 	command.Stdout = opts.stdout
 	command.Stderr = opts.stderr
 	command.Env = envvar.MapToSlice(opts.env)
-	if opts.verbose || opts.dryRun {
+	if opts.verbose {
 		args := []string{}
 		for _, arg := range command.Args {
 			// Quote any arguments that contain '"', ''', '|', or ' '.
@@ -180,10 +158,6 @@
 		}
 		e.printf(e.opts.stdout, strings.Replace(strings.Join(args, " "), "%", "%%", -1))
 	}
-	if opts.dryRun {
-		e.printf(e.opts.stdout, "OK")
-		return nil, nil
-	}
 
 	if wait {
 		if timeout == 0 {
diff --git a/runutil/executor_test.go b/runutil/executor_test.go
index c02ca43..634a647 100644
--- a/runutil/executor_test.go
+++ b/runutil/executor_test.go
@@ -40,7 +40,7 @@
 
 func TestCommandOK(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	if err := e.run(forever, e.opts, "go", "run", "./testdata/ok_hello.go"); err != nil {
 		t.Fatalf(`Command("go run ./testdata/ok_hello.go") failed: %v`, err)
 	}
@@ -51,7 +51,7 @@
 
 func TestCommandFail(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	if err := e.run(forever, e.opts, "go", "run", "./testdata/fail_hello.go"); err == nil {
 		t.Fatalf(`Command("go run ./testdata/fail_hello.go") did not fail when it should`)
 	}
@@ -62,7 +62,7 @@
 
 func TestCommandWithOptsOK(t *testing.T) {
 	var cmdOut, runOut bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, true)
 	opts := e.opts
 	opts.stdout = &cmdOut
 	if err := e.run(forever, opts, "go", "run", "./testdata/ok_hello.go"); err != nil {
@@ -78,7 +78,7 @@
 
 func TestCommandWithOptsFail(t *testing.T) {
 	var cmdOut, runOut bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, true)
 	opts := e.opts
 	opts.stdout = &cmdOut
 	if err := e.run(forever, opts, "go", "run", "./testdata/fail_hello.go"); err == nil {
@@ -94,7 +94,7 @@
 
 func TestTimedCommandOK(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	if err := e.run(10*time.Second, e.opts, "go", "run", "./testdata/fast_hello.go"); err != nil {
 		t.Fatalf(`TimedCommand("go run ./testdata/fast_hello.go") failed: %v`, err)
 	}
@@ -105,7 +105,7 @@
 
 func TestTimedCommandFail(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	bin, err := buildTestProgram(e, "slow_hello")
 	if bin != "" {
 		defer os.RemoveAll(filepath.Dir(bin))
@@ -125,7 +125,7 @@
 
 func TestTimedCommandWithOptsOK(t *testing.T) {
 	var cmdOut, runOut bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, true)
 	opts := e.opts
 	opts.stdout = &cmdOut
 	if err := e.run(10*time.Second, opts, "go", "run", "./testdata/fast_hello.go"); err != nil {
@@ -141,7 +141,7 @@
 
 func TestTimedCommandWithOptsFail(t *testing.T) {
 	var cmdOut, runOut bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &runOut, ioutil.Discard, false, true)
 	bin, err := buildTestProgram(e, "slow_hello")
 	if bin != "" {
 		defer os.RemoveAll(filepath.Dir(bin))
@@ -166,7 +166,7 @@
 
 func TestFunctionOK(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	fn := func() error {
 		cmd := exec.Command("go", "run", "./testdata/ok_hello.go")
 		cmd.Stdout = &out
@@ -182,7 +182,7 @@
 
 func TestFunctionFail(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	fn := func() error {
 		cmd := exec.Command("go", "run", "./testdata/fail_hello.go")
 		cmd.Stdout = &out
@@ -201,7 +201,7 @@
 
 func TestFunctionWithOptsOK(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, false)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false)
 	opts := e.opts
 	opts.verbose = true
 	fn := func() error {
@@ -222,7 +222,7 @@
 
 func TestFunctionWithOptsFail(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, false)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false)
 	opts := e.opts
 	opts.verbose = true
 	fn := func() error {
@@ -243,7 +243,7 @@
 
 func TestOutput(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	e.output(e.opts, []string{"hello", "world"})
 	if got, want := removeTimestamps(t, &out), ">> hello\n>> world\n"; got != want {
 		t.Fatalf("unexpected output:\ngot\n%v\nwant\n%v", got, want)
@@ -252,7 +252,7 @@
 
 func TestOutputWithOpts(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, false)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false)
 	opts := e.opts
 	opts.verbose = true
 	e.output(opts, []string{"hello", "world"})
@@ -263,7 +263,7 @@
 
 func TestNested(t *testing.T) {
 	var out bytes.Buffer
-	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, false, true)
+	e := newExecutor(nil, os.Stdin, &out, ioutil.Discard, false, true)
 	fn := func() error {
 		e.output(e.opts, []string{"hello", "world"})
 		return nil
diff --git a/runutil/sequence.go b/runutil/sequence.go
index 12d5014..3a930ae 100644
--- a/runutil/sequence.go
+++ b/runutil/sequence.go
@@ -94,7 +94,6 @@
 	defaultStdout, defaultStderr io.Writer
 	dirs                         []string
 	verbosity                    *bool
-	dryRun                       *bool
 	cmdDir                       string
 	timeout                      time.Duration
 	serializedWriterLock         sync.Mutex
@@ -110,7 +109,7 @@
 	}
 	s := Sequence{
 		&sequence{
-			r:            newExecutor(env, stdin, stdout, stderr, color, dryRun, verbose),
+			r:            newExecutor(env, stdin, stdout, stderr, color, verbose),
 			defaultStdin: stdin,
 		},
 	}
@@ -122,7 +121,7 @@
 // create this sequence.
 func (s Sequence) RunOpts() (dryRun bool, verbose bool) {
 	opts := s.getOpts()
-	return opts.dryRun, opts.verbose
+	return false, opts.verbose
 }
 
 // Capture arranges for the next call to Run or Last to write its stdout and
@@ -202,17 +201,6 @@
 	return s
 }
 
-// DryRun arranges for the next call to Run, Call, Start or Last to use the
-// specified dry run value. This will be cleared and not used for any calls
-// to Run, Call or Last beyond the next one.
-func (s Sequence) DryRun(dryRun bool) Sequence {
-	if s.err != nil {
-		return s
-	}
-	s.dryRun = &dryRun
-	return s
-}
-
 // internal getOpts that doesn't override stdin, stdout, stderr
 func (s Sequence) getOpts() opts {
 	var opts opts
@@ -334,7 +322,7 @@
 // reset all state except s.err
 func (s Sequence) reset() {
 	s.stdin, s.stdout, s.stderr, s.env = nil, nil, nil, nil
-	s.opts, s.verbosity, s.dryRun = nil, nil, nil
+	s.opts, s.verbosity = nil, nil
 	s.cmdDir = ""
 	s.reading = false
 	s.timeout = 0
@@ -421,9 +409,6 @@
 		if s.verbosity != nil {
 			opts.verbose = *s.verbosity
 		}
-		if s.dryRun != nil {
-			opts.dryRun = *s.dryRun
-		}
 		opts.dir = s.cmdDir
 		s.setOpts(opts)
 		if h != nil {
@@ -485,9 +470,6 @@
 	if s.verbosity != nil {
 		opts.verbose = *s.verbosity
 	}
-	if s.dryRun != nil {
-		opts.dryRun = *s.dryRun
-	}
 	opts.dir = s.cmdDir
 	s.setOpts(opts)
 	if h != nil {
@@ -640,7 +622,7 @@
 	if len(s.dirs) > 0 {
 		cwd := s.dirs[0]
 		s.dirs = nil
-		err := s.r.alwaysRun(func() error {
+		err := s.r.call(func() error {
 			return os.Chdir(cwd)
 		}, fmt.Sprintf("sequence done popd %q", cwd))
 		if err != nil {
@@ -668,7 +650,7 @@
 		return s
 	}
 	s.dirs = append(s.dirs, cwd)
-	err = s.r.alwaysRun(func() error {
+	err = s.r.call(func() error {
 		return os.Chdir(dir)
 	}, fmt.Sprintf("pushd %q", dir))
 	s.setError(err, "Pushd("+dir+")")
@@ -688,7 +670,7 @@
 	}
 	last := s.dirs[len(s.dirs)-1]
 	s.dirs = s.dirs[:len(s.dirs)-1]
-	err := s.r.alwaysRun(func() error {
+	err := s.r.call(func() error {
 		return os.Chdir(last)
 	}, fmt.Sprintf("popd %q", last))
 	s.setError(err, "Popd() -> "+last)
@@ -696,12 +678,12 @@
 }
 
 // Chdir is a wrapper around os.Chdir that handles options such as
-// "verbose" or "dry run".
+// "verbose".
 func (s Sequence) Chdir(dir string) Sequence {
 	if s.err != nil {
 		return s
 	}
-	err := s.r.alwaysRun(func() error {
+	err := s.r.call(func() error {
 		return os.Chdir(dir)
 	}, fmt.Sprintf("cd %q", dir))
 	s.setError(err, "Chdir("+dir+")")
@@ -710,7 +692,7 @@
 }
 
 // Chmod is a wrapper around os.Chmod that handles options such as
-// "verbose" or "dry run".
+// "verbose".
 func (s Sequence) Chmod(dir string, mode os.FileMode) Sequence {
 	if s.err != nil {
 		return s
@@ -722,7 +704,7 @@
 }
 
 // MkdirAll is a wrapper around os.MkdirAll that handles options such
-// as "verbose" or "dry run".
+// as "verbose".
 func (s Sequence) MkdirAll(dir string, mode os.FileMode) Sequence {
 	if s.err != nil {
 		return s
@@ -733,7 +715,7 @@
 }
 
 // RemoveAll is a wrapper around os.RemoveAll that handles options
-// such as "verbose" or "dry run".
+// such as "verbose".
 func (s Sequence) RemoveAll(dir string) Sequence {
 	if s.err != nil {
 		return s
@@ -744,7 +726,7 @@
 }
 
 // Remove is a wrapper around os.Remove that handles options
-// such as "verbose" or "dry run".
+// such as "verbose".
 func (s Sequence) Remove(file string) Sequence {
 	if s.err != nil {
 		return s
@@ -755,7 +737,7 @@
 }
 
 // Rename is a wrapper around os.Rename that handles options such as
-// "verbose" or "dry run".
+// "verbose".
 func (s Sequence) Rename(src, dst string) Sequence {
 	if s.err != nil {
 		return s
@@ -785,7 +767,7 @@
 }
 
 // Symlink is a wrapper around os.Symlink that handles options such as
-// "verbose" or "dry run".
+// "verbose".
 func (s Sequence) Symlink(src, dst string) Sequence {
 	if s.err != nil {
 		return s
@@ -796,7 +778,7 @@
 }
 
 // Open is a wrapper around os.Open that handles options such as
-// "verbose" or "dry run". Open is a terminating function.
+// "verbose". Open is a terminating function.
 func (s Sequence) Open(name string) (f *os.File, err error) {
 	if s.err != nil {
 		return nil, s.Done()
@@ -811,7 +793,7 @@
 }
 
 // OpenFile is a wrapper around os.OpenFile that handles options such as
-// "verbose" or "dry run". OpenFile is a terminating function.
+// "verbose". OpenFile is a terminating function.
 func (s Sequence) OpenFile(name string, flag int, perm os.FileMode) (f *os.File, err error) {
 	if s.err != nil {
 		return nil, s.Done()
@@ -826,7 +808,7 @@
 }
 
 // Create is a wrapper around os.Create that handles options such as "verbose"
-// or "dry run". Create is a terminating function.
+//. Create is a terminating function.
 func (s Sequence) Create(name string) (f *os.File, err error) {
 	if s.err != nil {
 		return nil, s.Done()
@@ -842,12 +824,12 @@
 }
 
 // ReadDir is a wrapper around ioutil.ReadDir that handles options
-// such as "verbose" or "dry run". ReadDir is a terminating function.
+// such as "verbose". ReadDir is a terminating function.
 func (s Sequence) ReadDir(dirname string) (fi []os.FileInfo, err error) {
 	if s.err != nil {
 		return nil, s.Done()
 	}
-	s.r.alwaysRun(func() error {
+	s.r.call(func() error {
 		fi, err = ioutil.ReadDir(dirname)
 		return err
 	}, fmt.Sprintf("ls %q", dirname))
@@ -857,13 +839,13 @@
 }
 
 // ReadFile is a wrapper around ioutil.ReadFile that handles options
-// such as "verbose" or "dry run". ReadFile is a terminating function.
+// such as "verbose". ReadFile is a terminating function.
 func (s Sequence) ReadFile(filename string) (bytes []byte, err error) {
 
 	if s.err != nil {
 		return nil, s.Done()
 	}
-	s.r.alwaysRun(func() error {
+	s.r.call(func() error {
 		bytes, err = ioutil.ReadFile(filename)
 		return err
 	}, fmt.Sprintf("read %q", filename))
@@ -873,7 +855,7 @@
 }
 
 // WriteFile is a wrapper around ioutil.WriteFile that handles options
-// such as "verbose" or "dry run".
+// such as "verbose".
 func (s Sequence) WriteFile(filename string, data []byte, perm os.FileMode) Sequence {
 	if s.err != nil {
 		return s
@@ -901,12 +883,12 @@
 }
 
 // Stat is a wrapper around os.Stat that handles options such as
-// "verbose" or "dry run". Stat is a terminating function.
+// "verbose". Stat is a terminating function.
 func (s Sequence) Stat(name string) (fi os.FileInfo, err error) {
 	if s.err != nil {
 		return nil, s.Done()
 	}
-	s.r.alwaysRun(func() error {
+	s.r.call(func() error {
 		fi, err = os.Stat(name)
 		return err
 	}, fmt.Sprintf("stat %q", name))
@@ -916,12 +898,12 @@
 }
 
 // Lstat is a wrapper around os.Lstat that handles options such as
-// "verbose" or "dry run". Lstat is a terminating function.
+// "verbose". Lstat is a terminating function.
 func (s Sequence) Lstat(name string) (fi os.FileInfo, err error) {
 	if s.err != nil {
 		return nil, s.Done()
 	}
-	s.r.alwaysRun(func() error {
+	s.r.call(func() error {
 		fi, err = os.Lstat(name)
 		return err
 	}, fmt.Sprintf("lstat %q", name))
@@ -931,12 +913,12 @@
 }
 
 // Readlink is a wrapper around os.Readlink that handles options such as
-// "verbose" or "dry run". Lstat is a terminating function.
+// "verbose". Lstat is a terminating function.
 func (s Sequence) Readlink(name string) (link string, err error) {
 	if s.err != nil {
 		return "", s.Done()
 	}
-	s.r.alwaysRun(func() error {
+	s.r.call(func() error {
 		link, err = os.Readlink(name)
 		return err
 	}, fmt.Sprintf("readlink %q", name))
@@ -946,7 +928,7 @@
 }
 
 // TempDir is a wrapper around ioutil.TempDir that handles options
-// such as "verbose" or "dry run". TempDir is a terminating function.
+// such as "verbose". TempDir is a terminating function.
 func (s Sequence) TempDir(dir, prefix string) (tmpDir string, err error) {
 	if s.err != nil {
 		return "", s.Done()
@@ -965,7 +947,7 @@
 }
 
 // TempFile is a wrapper around ioutil.TempFile that handles options
-// such as "verbose" or "dry run".
+// such as "verbose".
 func (s Sequence) TempFile(dir, prefix string) (f *os.File, err error) {
 	if s.err != nil {
 		return nil, s.Done()
@@ -991,7 +973,7 @@
 	}
 	var fileInfo os.FileInfo
 	var err error
-	err = s.r.alwaysRun(func() error {
+	err = s.r.call(func() error {
 		fileInfo, err = os.Stat(dirname)
 		return err
 	}, fmt.Sprintf("isdir %q", dirname))
@@ -1014,7 +996,7 @@
 	}
 	var fileInfo os.FileInfo
 	var err error
-	err = s.r.alwaysRun(func() error {
+	err = s.r.call(func() error {
 		fileInfo, err = os.Stat(file)
 		return err
 	}, fmt.Sprintf("isfile %q", file))
diff --git a/runutil/sequence_test.go b/runutil/sequence_test.go
index 806f3c7..3bb7421 100644
--- a/runutil/sequence_test.go
+++ b/runutil/sequence_test.go
@@ -358,24 +358,6 @@
 		}
 		stdout.Reset()
 	}
-	for _, dryRun := range []bool{false, true} {
-		err := seq.DryRun(dryRun).Last("sh", "-c", "echo hello")
-		if err != nil {
-			t.Fatal(err)
-		}
-		out := sanitizeTimestampsAndPaths(stdout.String())
-		want := `[hh:mm:ss.xx] >> sh -c "echo hello"
-[hh:mm:ss.xx] >> OK
-`
-		if !dryRun {
-			want += `hello
-`
-		}
-		if got, want := out, want; got != want {
-			t.Errorf("dryRun: %t, got %v, want %v", dryRun, got, want)
-		}
-		stdout.Reset()
-	}
 }
 
 func TestSequenceOutputOnError(t *testing.T) {