Skip to content

Commit d5aba76

Browse files
Merge pull request #202 from AArnott/fix197
Return exit code 3 from SignClient when no files will be signed
2 parents e258751 + f240047 commit d5aba76

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/SignClient/SignCommand.cs

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ static class EXIT_CODES
2525
public const int SUCCESS = 0;
2626
public const int INVALID_OPTIONS = 1;
2727
public const int FAILED = 2;
28+
public const int NO_INPUTS_FOUND = 3;
2829
}
2930

3031
public SignCommand(CommandLineApplication signCommandLineApplication)
@@ -168,6 +169,12 @@ CommandOption maxConcurrency
168169
return EXIT_CODES.INVALID_OPTIONS;
169170
}
170171

172+
if (inputFiles.Count == 0)
173+
{
174+
signCommandLineApplication.Error.WriteLine("No inputs found to sign.");
175+
return EXIT_CODES.NO_INPUTS_FOUND;
176+
}
177+
171178
Parallel.ForEach(inputFiles,new ParallelOptions { MaxDegreeOfParallelism = maxC } , input =>
172179
{
173180
FileInfo output;

0 commit comments

Comments
 (0)