sops
sops copied to clipboard
sops fails to match path_regex on Windows because it encounters '\', not '/'
Given a directory called my-local on Windows, the following will FAIL to match
creation_rules:
- path_regex: .*/my-local/.*
...
But the following will:
creation_rules:
# Sigh; must match the native idea of what filepath separator is used...
- path_regex: .*[/\\]my-local[/\\].*
...
Windows 10 20H2 sops 3.7.1 (latest)
WSL-2 is not being used; sops is being run from a PowerShell session
Sops should ideally canonicalise the path separator, perhaps following established behaviour in the likes of .gitignore and .dockerignore files.
Documenting what the regex would begin to match on would be good too and any implicit anchoring that may be in effect.