diff --git a/init.go b/init.go index 57a308f..86eaaad 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 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 { return cty.StringVal(path), nil