From 122d5438f74a52a6b5a195fb5bde3a4bc7076c6d Mon Sep 17 00:00:00 2001 From: Thomas Dickson Date: Wed, 18 Dec 2024 20:43:45 +1300 Subject: [PATCH] fix: make scanning print to stderr so the output can be directed into a file easier --- scan.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scan.go b/scan.go index 824f8e2..9a5d410 100644 --- a/scan.go +++ b/scan.go @@ -5,6 +5,7 @@ package main import ( "fmt" + "os" "strings" "mvdan.cc/fdroidcl/adb" @@ -33,9 +34,9 @@ func runScan(args []string) error { } for _, device := range devices { - fmt.Printf("Scanning %s - %s (%s)\n", device.ID, device.Model, device.Product) + fmt.Fprintf(os.Stderr, "Scanning %s - %s (%s)\n", device.ID, device.Model, device.Product) scanForPackages(device) - fmt.Println("Scan completed without error") + fmt.Fprintln(os.Stderr, "Scan completed without error") } return nil }