cmd/gofmt: don't eat source if -w fails
Write output to a temp file first and only upon success rename that file to source file name. Fixes #8984. Change-Id: Ie40e49d2a4eb3c9462fe769ccbf055b4366eceb0 Reviewed-on: https://go-review.googlesource.com/33018Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please register or sign in to comment