From 08a7ebc305a96ca08b97b7de260c02543eeca323 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Mon, 8 Feb 2021 00:09:37 +0100 Subject: git-codereview: fix runDirErr to actually use the passed directory Change-Id: I39f16f70e928999674b4f6f60c505ca0a51c46a9 Reviewed-on: https://go-review.googlesource.com/c/review/+/290211 Trust: Filippo Valsorda Run-TryBot: Filippo Valsorda TryBot-Result: Go Bot Reviewed-by: Russ Cox --- git-codereview/review.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-codereview/review.go b/git-codereview/review.go index 6dcb6a0..1e79114 100644 --- a/git-codereview/review.go +++ b/git-codereview/review.go @@ -170,7 +170,7 @@ func run(command string, args ...string) { } func runErr(command string, args ...string) error { - return runDirErr("", command, args...) + return runDirErr(".", command, args...) } var runLogTrap []string @@ -194,6 +194,9 @@ func runDirErr(dir, command string, args ...string) error { cmd.Stdin = os.Stdin cmd.Stdout = stdout() cmd.Stderr = stderr() + if dir != "." { + cmd.Dir = dir + } setEnglishLocale(cmd) return cmd.Run() } -- cgit v1.3