From aa5b82544bdcf01646aa12f7d01073b14a0618df Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Fri, 27 Jun 2025 12:56:48 -0500 Subject: [PATCH 1/2] chore: comment original source for the code change on path expansion --- init.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.go b/init.go index 57a308f..8ba9817 100644 --- a/init.go +++ b/init.go @@ -25,6 +25,8 @@ func init() { }, Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { + // This code is taken directly from "github.com/mitchellh/go-homedir" + // The only change is that instead of expanding the path, we return an error path := args[0].AsString() if len(path) == 0 { return cty.StringVal(path), nil From 045d5a8da5596fe5dbe12bf4140fdf6041fd5021 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Fri, 27 Jun 2025 13:03:34 -0500 Subject: [PATCH 2/2] more precise source comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ケイラ --- init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.go b/init.go index 8ba9817..86eaaad 100644 --- a/init.go +++ b/init.go @@ -25,7 +25,7 @@ func init() { }, Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { - // This code is taken directly from "github.com/mitchellh/go-homedir" + // This code is taken directly from https://github.com/mitchellh/go-homedir/blob/af06845cf3004701891bf4fdb884bfe4920b3727/homedir.go#L58 // The only change is that instead of expanding the path, we return an error path := args[0].AsString() if len(path) == 0 {