diff options
author | Clyybber <darkmine956@gmail.com> | 2021-05-17 13:48:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 13:48:10 +0200 |
commit | fac5bae7b7d87aeec48c7252029c2852ee157ac9 (patch) | |
tree | 4d5f334e0cf2961284da9cb05e0a2c3093ac00b3 /testament/categories.nim | |
parent | 8be5344b3bb74d62cff5aa6a18f4223680612ad5 (diff) | |
download | Nim-fac5bae7b7d87aeec48c7252029c2852ee157ac9.tar.gz |
Fix running testament c nimble-packages without batch arg (#18023)
* Fix running testament c nimble-packages without batch arg * Fix
Diffstat (limited to 'testament/categories.nim')
-rw-r--r-- | testament/categories.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testament/categories.nim b/testament/categories.nim index 1253a2b8c..1f0bd6acf 100644 --- a/testament/categories.nim +++ b/testament/categories.nim @@ -424,11 +424,12 @@ proc listPackages(packageFilter: string): seq[NimblePackage] = # at least should be a regex; a substring match makes no sense. result = pkgs.filterIt(packageFilter in it.name) else: - let pkgs1 = pkgs.filterIt(it.allowFailure) - let pkgs2 = pkgs.filterIt(not it.allowFailure) if testamentData0.batchArg == "allowed_failures": - result = pkgs1 + result = pkgs.filterIt(it.allowFailure) + elif testamentData0.testamentNumBatch == 0: + result = pkgs else: + let pkgs2 = pkgs.filterIt(not it.allowFailure) for i in 0..<pkgs2.len: if i mod testamentData0.testamentNumBatch == testamentData0.testamentBatch: result.add pkgs2[i] |