From 44edd231b0a4807a63d30190535ee416a7e54d25 Mon Sep 17 00:00:00 2001 From: Cari Date: Fri, 18 Feb 2022 12:15:25 -0800 Subject: [PATCH] Recreate error with full windows path --- examples/integrating-with-ytt/internal-templating/main.go | 2 +- hack/test-windows.ps1 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/integrating-with-ytt/internal-templating/main.go b/examples/integrating-with-ytt/internal-templating/main.go index 77f59ec6..fa333025 100644 --- a/examples/integrating-with-ytt/internal-templating/main.go +++ b/examples/integrating-with-ytt/internal-templating/main.go @@ -70,7 +70,7 @@ func templatesAsInput(tpl... string) (yttcmd.Input, error) { for i, t := range tpl { // to make this less brittle, you'll probably want to use well-defined names for `path`, here, for each input. // this matters when you're processing errors which report based on these paths. - file, err := yttfiles.NewFileFromSource(yttfiles.NewBytesSource(fmt.Sprintf("tpl%d.yml", i), []byte(t))) + file, err := yttfiles.NewFileFromSource(yttfiles.NewBytesSource(fmt.Sprintf("C:\\Users\\user\\Desktop\\tpl%d.yml", i), []byte(t))) if err != nil { return yttcmd.Input{}, err } diff --git a/hack/test-windows.ps1 b/hack/test-windows.ps1 index 4ac62c07..644774aa 100755 --- a/hack/test-windows.ps1 +++ b/hack/test-windows.ps1 @@ -19,3 +19,5 @@ ytt version # We only care about exit code ytt -f examples\load-paths + +( cd examples/integrating-with-ytt/internal-templating && go test ./... ) \ No newline at end of file