Merge pull request #1103 from samalba/fix-windows-dir-encoding

state: fixed input dir encoding on windows
This commit is contained in:
Andrea Luzzardi 2021-11-08 13:20:31 -08:00 committed by GitHub
commit 23d488d462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
)