Merge pull request #6495 from thaJeztah/improve_versions
strip path-info from `-v` (version) output, and implement -v flag for containerd-shim
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
@@ -240,7 +241,7 @@ func RunManager(ctx context.Context, manager Manager, opts ...BinaryOpts) {
|
||||
func run(ctx context.Context, manager Manager, initFunc Init, name string, config Config) error {
|
||||
parseFlags()
|
||||
if versionFlag {
|
||||
fmt.Printf("%s:\n", os.Args[0])
|
||||
fmt.Printf("%s:\n", filepath.Base(os.Args[0]))
|
||||
fmt.Println(" Version: ", version.Version)
|
||||
fmt.Println(" Revision:", version.Revision)
|
||||
fmt.Println(" Go version:", version.GoVersion)
|
||||
|
||||
Reference in New Issue
Block a user