Skip to content

Commit

Permalink
add runtime.Version() to runc --version
Browse files Browse the repository at this point in the history
Printing Go version would be helpful to debug runtime-related errors.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed Aug 7, 2020
1 parent a340fa9 commit 1d85333
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io"
"os"
"runtime"
"strings"

"github.com/opencontainers/runc/libcontainer/logs"
Expand Down Expand Up @@ -62,6 +63,7 @@ func main() {
v = append(v, fmt.Sprintf("commit: %s", gitCommit))
}
v = append(v, fmt.Sprintf("spec: %s", specs.Version))
v = append(v, fmt.Sprintf("go: %s", runtime.Version()))
app.Version = strings.Join(v, "\n")

xdgRuntimeDir := ""
Expand Down

0 comments on commit 1d85333

Please sign in to comment.