Update to newest pkglib
This commit is contained in:
parent
1bdcb6e3b4
commit
7ff2ecf7fe
11 changed files with 95 additions and 41 deletions
|
|
@ -45,8 +45,12 @@ func (pcfg PathsConfig) UsingDistilleryExecutable() bool {
|
|||
// When it does not exist, falls back to the default executable.
|
||||
func (pcfg PathsConfig) CurrentExecutable() string {
|
||||
exe, err := os.Executable()
|
||||
if err != nil || !fsx.IsRegular(exe) {
|
||||
return pcfg.ExecutablePath()
|
||||
if err == nil {
|
||||
isFile, err := fsx.IsRegular(exe, true)
|
||||
if err == nil && isFile {
|
||||
return exe
|
||||
}
|
||||
}
|
||||
return exe
|
||||
|
||||
return pcfg.ExecutablePath()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue