From 21e1f89f3aff01af214a9a1af2b48294a4a04365 Mon Sep 17 00:00:00 2001 From: Sam Alba Date: Fri, 5 Nov 2021 17:16:23 -0700 Subject: [PATCH] state: fixed input dir encoding on windows Signed-off-by: Sam Alba --- state/input.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/state/input.go b/state/input.go index 58fa6c6f..838a5844 100644 --- a/state/input.go +++ b/state/input.go @@ -119,9 +119,14 @@ func (dir dirInput) Compile(_ string, state *State) (*compiler.Value, error) { return nil, fmt.Errorf("%q dir doesn't exist", dir.Path) } + dirPath, err := json.Marshal(p) + if err != nil { + return nil, err + } + llb := fmt.Sprintf( - `#up: [{do:"local",dir:"%s", include:%s, exclude:%s}]`, - p, + `#up: [{do:"local",dir:%s, include:%s, exclude:%s}]`, + dirPath, includeLLB, excludeLLB, )