Skip to content

Commit 80d1ef4

Browse files
Emyrkaslilac
andauthored
chore: comment original source for the code change on path expansion (#161)
Co-authored-by: ケイラ <[email protected]>
1 parent ae79d6d commit 80d1ef4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

init.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ func init() {
2525
},
2626
Type: function.StaticReturnType(cty.String),
2727
Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) {
28+
// This code is taken directly from https://github.com/mitchellh/go-homedir/blob/af06845cf3004701891bf4fdb884bfe4920b3727/homedir.go#L58
29+
// The only change is that instead of expanding the path, we return an error
2830
path := args[0].AsString()
2931
if len(path) == 0 {
3032
return cty.StringVal(path), nil

0 commit comments

Comments
 (0)