mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Fix absolute path getting for runc binary
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
@@ -97,12 +96,6 @@ func main() {
|
||||
os.Exit(status)
|
||||
}
|
||||
|
||||
//allow for relative path for the runC binary
|
||||
if absPath, err := filepath.Abs(os.Args[0]); err != nil {
|
||||
logrus.Fatal("Cannot convert runc path to absolute: %v", err)
|
||||
} else {
|
||||
os.Args[0] = absPath
|
||||
}
|
||||
if err := app.Run(os.Args); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user