aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/swextreload/main.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/cmd/swextreload/main.go b/cmd/swextreload/main.go
index 1b56eb6..f11a1e1 100644
--- a/cmd/swextreload/main.go
+++ b/cmd/swextreload/main.go
@@ -31,6 +31,12 @@ func main() {
Type: "bool",
Description: "show the program version",
},
+ {
+ LongName: "debug",
+ Type: "bool",
+ DefaultValue: false,
+ Description: "print debug output",
+ },
},
Positionals: []claw.Positional{
{
@@ -46,8 +52,6 @@ func main() {
log.Fatal(err)
}
- log.Printf("args: %#v", args)
-
socket_url, ok := args["socket-url"].(string)
if !ok {
fmt.Fprintln(os.Stderr, "error: '--socket-url' is required")
@@ -60,6 +64,15 @@ func main() {
os.Exit(sysexits.Usage)
}
+ isDebug := args["debug"].(bool)
+ if isDebug {
+ swextreload.SetDebugOn()
+ }
+
+ if isDebug {
+ log.Printf("args: %#v", args)
+ }
+
err = swextreload.Reload(
socket_url,
extension_ids,