fix: Adding Support for Windows Paths in Bash (#438)

Included support for Absolute Paths in Windows that begin with e.g. `G:/`
This commit is contained in:
Michele Adduci 2022-08-29 12:32:02 +02:00 committed by GitHub
parent 57a5d44b1f
commit 19a7059828
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,7 +146,7 @@ func validateDockerContainerPath() schema.SchemaValidateDiagFunc {
return func(v interface{}, p cty.Path) diag.Diagnostics {
value := v.(string)
var diags diag.Diagnostics
if !regexp.MustCompile(`^[a-zA-Z]:\\|^/`).MatchString(value) {
if !regexp.MustCompile(`^[a-zA-Z]:[\\/]|^/`).MatchString(value) {
diag := diag.Diagnostic{
Severity: diag.Error,
Summary: fmt.Sprintf("'%v' must be an absolute path", value),