blablacar / dgr

Container build and runtime tool
Apache License 2.0
249 stars 21 forks source link

Add compatibility rkt >1.1 #119

Closed nyodas closed 8 years ago

nyodas commented 8 years ago

DGR crash at launch . Since This PR in rkt implemented in rkt version 1.1.0

Trace

rkt: missing command
panic: rkt is required in PATH

goroutine 1 [running]:
github.com/blablacar/dgr/commands.checkRktVersion()
    /home/n0rad/Work/go/src/github.com/blablacar/dgr/commands/dgr.go:72 +0xe1
github.com/blablacar/dgr/commands.Execute()
    /home/n0rad/Work/go/src/github.com/blablacar/dgr/commands/dgr.go:24 +0x27
main.main()
    /home/n0rad/Work/go/src/github.com/blablacar/dgr/main.go:17 +0x5c

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:1721 +0x1

Because the exit code is not 0 when you don't specify a command.

CyBeRoni commented 8 years ago
diff --git a/commands/dgr.go b/commands/dgr.go
index b9a8ba6..8ddc161 100644
--- a/commands/dgr.go
+++ b/commands/dgr.go
@@ -67,7 +67,7 @@ func Execute() {
 }

 func checkRktVersion() {
-       output, err := utils.ExecCmdGetOutput("rkt")
+       output, err := utils.ExecCmdGetOutput("rkt", "version")
        if err != nil {
                panic("rkt is required in PATH")
        }
n0rad commented 8 years ago

fixed in v57