Skip to content

Commit

Permalink
don't check path is an actual file
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Nov 20, 2023
1 parent 2f59e08 commit 5873718
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 5873718

Please sign in to comment.