Skip to content

Commit

Permalink
Merge pull request #493 from ndeloof/soft_validate
Browse files Browse the repository at this point in the history
don't check path is an actual file
  • Loading branch information
ndeloof committed Nov 20, 2023
2 parents e058570 + 5873718 commit ac96b93
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
"ipv4_address": {"type": "string"},
"ipv6_address": {"type": "string"},
"link_local_ips": {"$ref": "#/definitions/list_of_strings"},
"mac_address": {"type": "string"},
"priority": {"type": "number"}
},
"additionalProperties": false,
Expand Down
4 changes: 0 additions & 4 deletions validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package validation

import (
"fmt"
"os"
"strings"

"github.com/compose-spec/compose-go/v2/tree"
Expand Down Expand Up @@ -94,8 +93,5 @@ func checkPath(value any, p tree.Path) error {
if v == "" {
return errors.Errorf("%s: value can't be blank", p)
}
if _, err := os.Stat(v); err != nil {
return errors.Wrapf(err, "%s: invalid path %s", p, value)
}
return nil
}

0 comments on commit ac96b93

Please sign in to comment.