From b031c141491d64d97be4ce36ce794fc7067c184b Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Mon, 29 Feb 2016 13:40:45 +0100 Subject: [PATCH] Revert "resolve the config file from the sudo user" This reverts commit afde6450ee7bd4a43765fdc0a9799b411276d9e4. Signed-off-by: Antonio Murdaca --- homedir/homedir.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/homedir/homedir.go b/homedir/homedir.go index b8d9a93..8154e83 100644 --- a/homedir/homedir.go +++ b/homedir/homedir.go @@ -29,19 +29,6 @@ func Get() string { return home } -// GetWithSudoUser returns the home directory of the user who called sudo (if -// available, retrieved from $SUDO_USER). It fallbacks to Get if any error occurs. -// Returned path should be used with "path/filepath" to form new paths. -func GetWithSudoUser() string { - sudoUser := os.Getenv("SUDO_USER") - if sudoUser != "" { - if user, err := user.LookupUser(sudoUser); err == nil { - return user.Home - } - } - return Get() -} - // GetShortcutString returns the string that is shortcut to user's home directory // in the native shell of the platform running on. func GetShortcutString() string {