From 0e1d8a72e6d00029362b8e24d35853202d86a724 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sun, 8 Sep 2019 21:56:23 -0300 Subject: [PATCH] Revert "Ensure the $HOME env is being set on Windows" This reverts commit 52028fc3bc5c9a80d3974b2f74efa491229df075. --- cmd/task/task.go | 1 - internal/homefix/homefix.go | 5 ----- internal/homefix/homefix_windows.go | 15 --------------- task_test.go | 1 - 4 files changed, 22 deletions(-) delete mode 100644 internal/homefix/homefix.go delete mode 100644 internal/homefix/homefix_windows.go diff --git a/cmd/task/task.go b/cmd/task/task.go index 2805489b..b71023ac 100644 --- a/cmd/task/task.go +++ b/cmd/task/task.go @@ -10,7 +10,6 @@ import ( "github.com/go-task/task/v2" "github.com/go-task/task/v2/internal/args" - _ "github.com/go-task/task/v2/internal/homefix" "github.com/spf13/pflag" ) diff --git a/internal/homefix/homefix.go b/internal/homefix/homefix.go deleted file mode 100644 index 641ae79a..00000000 --- a/internal/homefix/homefix.go +++ /dev/null @@ -1,5 +0,0 @@ -// Package homefix exists to address a bug where mvdan.cc/sh expects -// $HOME to be available in order to be able to expand "~". -// -// We should delete this package once this is fixed there. -package homefix diff --git a/internal/homefix/homefix_windows.go b/internal/homefix/homefix_windows.go deleted file mode 100644 index 28ed67fc..00000000 --- a/internal/homefix/homefix_windows.go +++ /dev/null @@ -1,15 +0,0 @@ -package homefix - -import ( - "os" - - "github.com/mitchellh/go-homedir" -) - -func init() { - if os.Getenv("HOME") == "" { - if home, err := homedir.Dir(); err == nil { - os.Setenv("HOME", home) - } - } -} diff --git a/task_test.go b/task_test.go index 24862dd1..d34abf67 100644 --- a/task_test.go +++ b/task_test.go @@ -12,7 +12,6 @@ import ( "testing" "github.com/go-task/task/v2" - _ "github.com/go-task/task/v2/internal/homefix" "github.com/go-task/task/v2/internal/taskfile" "github.com/mitchellh/go-homedir"