Skip to content

Commit

Permalink
Short-circuit check --rerun if testdir doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
muzimuzhi authored and josephwright committed Nov 6, 2023
1 parent 8949ef3 commit 6014344
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ this project uses date-based 'snapshot' version identifiers.
- Document default value of `ctanpkg` as a valid lua expression
- Improve log for failed checks with no diff files

### Fixed
- Short-circuit `check --rerun` if `testdir` doesn't exist

## [2023-11-01]

### Changed
Expand Down
8 changes: 7 additions & 1 deletion l3build-check.lua
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,13 @@ end
function check(names)
local errorlevel = 0
if testfiledir ~= "" and direxists(testfiledir) then
if not options["rerun"] then
if options["rerun"] then
if not direxists(testdir) then
print("\n Test directory \"" .. testdir .. "\" doesn't exist.")
print(" Try again without \"--rerun\".\n")
return 1
end
else
errorlevel = checkinit()
if errorlevel ~= 0 then
return errorlevel
Expand Down

0 comments on commit 6014344

Please sign in to comment.