mirror of
https://github.com/bettercap/bettercap
synced 2025-07-29 19:20:00 -07:00
fix: updated islazy to 1.10.3 (ref #481)
This commit is contained in:
parent
852abec22e
commit
603735adb6
2 changed files with 12 additions and 8 deletions
6
Gopkg.lock
generated
6
Gopkg.lock
generated
|
@ -83,7 +83,7 @@
|
||||||
revision = "2ce16c963a8ac5bd6af851d4877e38701346983f"
|
revision = "2ce16c963a8ac5bd6af851d4877e38701346983f"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:a5fab5a807cac4da733996f46b917283fe43aac5fd32798a3c9279a44eb5156c"
|
digest = "1:da1be9af4c3f262bd385cc722b08d98d4a47ddea57731e98b85c7ba21b35bc31"
|
||||||
name = "github.com/evilsocket/islazy"
|
name = "github.com/evilsocket/islazy"
|
||||||
packages = [
|
packages = [
|
||||||
"data",
|
"data",
|
||||||
|
@ -96,8 +96,8 @@
|
||||||
"zip",
|
"zip",
|
||||||
]
|
]
|
||||||
pruneopts = "UT"
|
pruneopts = "UT"
|
||||||
revision = "e6f5e33089826f0d17eaab3c8c3603048d615a0e"
|
revision = "6ef79e84ded205e48f296d21e3bc65d1cf4f5c78"
|
||||||
version = "v1.10.2"
|
version = "v1.10.3"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
|
|
14
vendor/github.com/evilsocket/islazy/fs/misc.go
generated
vendored
14
vendor/github.com/evilsocket/islazy/fs/misc.go
generated
vendored
|
@ -12,16 +12,20 @@ var (
|
||||||
cwdLock = sync.Mutex{}
|
cwdLock = sync.Mutex{}
|
||||||
)
|
)
|
||||||
|
|
||||||
// Expand will expand a path with ~ to a full path of the current user.
|
// Expand will expand a path with ~ to the $HOME of the current user.
|
||||||
func Expand(path string) (string, error) {
|
func Expand(path string) (string, error) {
|
||||||
if path == "" {
|
if path == "" {
|
||||||
return path, nil
|
return path, nil
|
||||||
}
|
}
|
||||||
usr, err := user.Current()
|
home := os.Getenv("HOME")
|
||||||
if err != nil {
|
if home == "" {
|
||||||
return "", err
|
usr, err := user.Current()
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
home = usr.HomeDir
|
||||||
}
|
}
|
||||||
return filepath.Abs(strings.Replace(path, "~", usr.HomeDir, 1))
|
return filepath.Abs(strings.Replace(path, "~", home, 1))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exists returns true if the path exists.
|
// Exists returns true if the path exists.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue