]> ruderich.org/simon Gitweb - linux-network-namespace-labs/linux-network-namespace-labs.git/commitdiff
Improve error message when parsing output of `ip -json link`
authorSimon Ruderich <simon@ruderich.org>
Tue, 5 Nov 2024 06:42:11 +0000 (07:42 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 5 Nov 2024 06:42:11 +0000 (07:42 +0100)
setup.go

index 80b3276efabc2dc5b8d39800ba1971f3c7fe562e..e49413d6ee6477cb30f11aaa17ce79bd7ffeae7b 100644 (file)
--- a/setup.go
+++ b/setup.go
@@ -220,7 +220,7 @@ func ifaceExists(netns, name string) bool {
        }
        err = json.Unmarshal(out, &ifaces)
        if err != nil {
-               log.Fatalf("failed to parse output from ip (%q): %v", out, err)
+               log.Fatalf("failed to parse output from %v (%q): %v", xargs, out, err)
        }
 
        for _, x := range ifaces {