From 603735adb643dd14b6b9dbfa030e9e640e98e0d0 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Wed, 13 Mar 2019 06:12:09 +0100 Subject: [PATCH] fix: updated islazy to 1.10.3 (ref #481) --- Gopkg.lock | 6 +++--- vendor/github.com/evilsocket/islazy/fs/misc.go | 14 +++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 38900389..8ddcccf8 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -83,7 +83,7 @@ revision = "2ce16c963a8ac5bd6af851d4877e38701346983f" [[projects]] - digest = "1:a5fab5a807cac4da733996f46b917283fe43aac5fd32798a3c9279a44eb5156c" + digest = "1:da1be9af4c3f262bd385cc722b08d98d4a47ddea57731e98b85c7ba21b35bc31" name = "github.com/evilsocket/islazy" packages = [ "data", @@ -96,8 +96,8 @@ "zip", ] pruneopts = "UT" - revision = "e6f5e33089826f0d17eaab3c8c3603048d615a0e" - version = "v1.10.2" + revision = "6ef79e84ded205e48f296d21e3bc65d1cf4f5c78" + version = "v1.10.3" [[projects]] branch = "master" diff --git a/vendor/github.com/evilsocket/islazy/fs/misc.go b/vendor/github.com/evilsocket/islazy/fs/misc.go index 04cb8116..5038438f 100644 --- a/vendor/github.com/evilsocket/islazy/fs/misc.go +++ b/vendor/github.com/evilsocket/islazy/fs/misc.go @@ -12,16 +12,20 @@ var ( 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) { if path == "" { return path, nil } - usr, err := user.Current() - if err != nil { - return "", err + home := os.Getenv("HOME") + if home == "" { + 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.