summaryrefslogtreecommitdiff
path: root/zip
diff options
context:
space:
mode:
author Dan Willemsen <dwillemsen@google.com> 2018-12-27 12:41:25 -0800
committer Dan Willemsen <dwillemsen@google.com> 2018-12-27 12:41:25 -0800
commitedc934ccc935e96ec83dc9932e03d4b23578a155 (patch)
treeecd68c6f8cd5075c674eeb485c10254b5da419f8 /zip
parent9e4c07a92f1c39a7e6d87f7d9451e6810ec87bfb (diff)
Fix soong_zip printing warnings with --ignore_missing_files
We weren't defaulting args.Stderr to os.Stderr, so we had been calling fmt.Fprintln with `nil`. Test: soong_zip --ignore_missing_files -C test/ -f abc -o test.zip Change-Id: I0421f4bfb07fa36edf86c68ffc847995777c8221
Diffstat (limited to 'zip')
-rw-r--r--zip/zip.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/zip/zip.go b/zip/zip.go
index 774966a73..1f5fe4335 100644
--- a/zip/zip.go
+++ b/zip/zip.go
@@ -317,7 +317,7 @@ func ZipTo(args ZipArgs, w io.Writer) error {
Err: os.ErrNotExist,
}
if args.IgnoreMissingFiles {
- fmt.Fprintln(args.Stderr, "warning:", err)
+ fmt.Fprintln(z.stderr, "warning:", err)
} else {
return err
}
@@ -334,7 +334,7 @@ func ZipTo(args ZipArgs, w io.Writer) error {
Err: os.ErrNotExist,
}
if args.IgnoreMissingFiles {
- fmt.Fprintln(args.Stderr, "warning:", err)
+ fmt.Fprintln(z.stderr, "warning:", err)
} else {
return err
}
@@ -345,7 +345,7 @@ func ZipTo(args ZipArgs, w io.Writer) error {
Err: syscall.ENOTDIR,
}
if args.IgnoreMissingFiles {
- fmt.Fprintln(args.Stderr, "warning:", err)
+ fmt.Fprintln(z.stderr, "warning:", err)
} else {
return err
}