cmd/go/internal/script: log the stop message instead of the state when stopping

Change-Id: I3c887b5f3716e78dfffad6869f986c4381fae3e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/488235
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Bryan C. Mills 2023-04-24 13:52:28 -04:00 committed by Gopher Robot
parent 2d83b646d6
commit fa4781a415
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ func (e *Engine) Execute(s *State, file string, script *bufio.Reader, log io.Wri
// Since the 'stop' command halts execution of the entire script,
// log its message separately from the section in which it appears.
err = endSection(true)
s.Logf("%v\n", s)
s.Logf("%v\n", stop)
if err == nil {
return nil
}