Skip to content

Commit f3981a0

Browse files
authored
Update README.md
1 parent f47a940 commit f3981a0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ let main argv =
3232
inputs (
3333
argument "zipfile"
3434
|> desc "The file to unzip"
35+
|> validateFileExists
3536
|> validate (fun zipFile ->
36-
if zipFile.Exists
37+
if zipFile.Length <= 500000
3738
then Ok ()
38-
else Error $"File does not exist: {zipFile.FullName}"
39+
else Error $"File cannot be bigger than 500 KB"
3940
),
4041
4142
optionMaybe "--output"
4243
|> alias "-o"
4344
|> desc "The output directory"
45+
|> validateDirectoryExists
4446
)
4547
setAction unzip
4648
}

0 commit comments

Comments
 (0)