Fix Linkmode path resolution
In case if crio is located and run from `$PATH`, `Args[0]` is just `crio`, so `filepath.Abs` returns `${PWD}/crio`
os.Executables() should be used instead
@@ -161,7 +161,7 @@ func (i *Info) String() string {
}
func getLinkmode() string {
- abspath, err := filepath.Abs(os.Args[0])
+ abspath, err := os.Executable()
if err != nil {
return fmt.Sprintf("unknown: %v", err)
}
