main: errors to stderr

This commit is contained in:
Motiejus Jakštys 2024-05-10 14:38:29 +03:00
parent db45af6b9d
commit 91b3730f0c

View File

@ -43,7 +43,7 @@ func main() {
c := &command{flattener: rootfs.Flatten, Stdout: os.Stdout} c := &command{flattener: rootfs.Flatten, Stdout: os.Stdout}
if err := c.execute(os.Args[1], os.Args[2]); err != nil { if err := c.execute(os.Args[1], os.Args[2]); err != nil {
fmt.Printf("Error: %v\n", err) fmt.Sprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1) os.Exit(1)
} }
os.Exit(0) os.Exit(0)