fix -script parsing

The ':' introduced a new scope, and we would always wait on the outside
`file`, stdin.

Change-Id: I5176a80abd40650a0167150ff5e996613ecc93e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206581
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This commit is contained in:
Mike Klein 2019-04-08 08:27:55 -05:00
parent 8cef07e707
commit ccdd6a14ac

View File

@ -168,7 +168,7 @@ func main() {
if *script != "" {
file := os.Stdin
if *script != "-" {
file, err := os.Open(*script)
file, err = os.Open(*script)
if err != nil {
log.Fatal(err)
}