[parseArgs] bucket and source are required

This commit is contained in:
Paul Campbell 2019-05-06 11:35:24 +01:00
parent de5cd375d2
commit dcda643934

View file

@ -14,9 +14,11 @@ object ParseArgs {
head("s3thorp", "0.1.0"), head("s3thorp", "0.1.0"),
opt[String]('s', "source") opt[String]('s', "source")
.action((str, c) => c.copy(source = str)) .action((str, c) => c.copy(source = str))
.required()
.text("Source directory to sync to S3"), .text("Source directory to sync to S3"),
opt[String]('b', "bucket") opt[String]('b', "bucket")
.action((str, c) => c.copy(bucket = str)) .action((str, c) => c.copy(bucket = str))
.required()
.text("S3 bucket name"), .text("S3 bucket name"),
opt[String]('p', "prefix") opt[String]('p', "prefix")
.action((str, c) => c.copy(prefix = str)) .action((str, c) => c.copy(prefix = str))