-
Notifications
You must be signed in to change notification settings - Fork 233
Fixed check for volume source being null or empty #1044
Changes from all commits
3eaeaf9
6f47ce9
c6700b4
e15c500
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,7 +150,11 @@ public Set<String> validate(final Job job) { | |
errors.add("Volume path is not absolute: " + path); | ||
continue; | ||
} | ||
if (!isNullOrEmpty(source) && !source.startsWith("/")) { | ||
if (isNullOrEmpty(source)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems like before, a null or empty source was allowed. Now this will cause an error. Am I correct on that and is that change intentional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mattnworb I'm preparing another PR adding an option to allow also 'named volumes' and this PR needs the above change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @piccobit thanks - it would be helpful to see both changes in context. |
||
errors.add("Volume source is null or empty"); | ||
continue; | ||
} | ||
if (!source.startsWith("/")) { | ||
errors.add("Volume source is not absolute: " + source); | ||
continue; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just change
&&
to||
, but I guess more specific errors can't hurt.