Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Does not validate Azure or Google blob storage #171

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class DirectoryPathValidator implements FormatValidator {

@Override
public Optional<String> validate(final String subject) {
if (subject.startsWith('s3://')) {
if (subject.matches("(s3://|az://|gs://).*")) {
log.debug("S3 paths are not supported by 'DirectoryPathValidator': '${subject}'")
adamrtalbot marked this conversation as resolved.
Show resolved Hide resolved
return Optional.empty()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class FilePathPatternValidator implements FormatValidator {

@Override
public Optional<String> validate(final String subject) {
if (subject.startsWith('s3://')) {
if (subject.matches("(s3://|az://|gs://).*")) {
log.debug("S3 paths are not supported by 'FilePathPatternValidator': '${subject}'")
adamrtalbot marked this conversation as resolved.
Show resolved Hide resolved
return Optional.empty()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class FilePathValidator implements FormatValidator {

@Override
public Optional<String> validate(final String subject) {
if (subject.startsWith('s3://')) {
if (subject.matches("(s3://|az://|gs://).*")) {
log.debug("S3 paths are not supported by 'FilePathValidator': '${subject}'")
adamrtalbot marked this conversation as resolved.
Show resolved Hide resolved
return Optional.empty()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class PathValidator implements FormatValidator {

@Override
public Optional<String> validate(final String subject) {
if (subject.startsWith('s3://')) {
if (subject.matches("(s3://|az://|gs://).*")) {
log.debug("S3 paths are not supported by 'PathValidator': '${subject}'")
adamrtalbot marked this conversation as resolved.
Show resolved Hide resolved
return Optional.empty()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ class SchemaValidator extends PluginExtensionPoint {
// Function to check if a file or directory exists
//
List pathExists(String path, String paramName, Boolean s3PathCheck) {
if (path.startsWith('s3://') && !s3PathCheck) {
if (path.matches("(s3://|az://|gs://).*") && !s3PathCheck) {
log.debug "Ignoring validation of S3 URL path '${path}'".toString()
adamrtalbot marked this conversation as resolved.
Show resolved Hide resolved
} else {
def Path file = Nextflow.file(path) as Path
Expand Down
Loading