We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f47a940 commit f3981a0Copy full SHA for f3981a0
1 file changed
README.md
@@ -32,15 +32,17 @@ let main argv =
32
inputs (
33
argument "zipfile"
34
|> desc "The file to unzip"
35
+ |> validateFileExists
36
|> validate (fun zipFile ->
- if zipFile.Exists
37
+ if zipFile.Length <= 500000
38
then Ok ()
- else Error $"File does not exist: {zipFile.FullName}"
39
+ else Error $"File cannot be bigger than 500 KB"
40
),
41
42
optionMaybe "--output"
43
|> alias "-o"
44
|> desc "The output directory"
45
+ |> validateDirectoryExists
46
)
47
setAction unzip
48
}
0 commit comments