]> Repositorios git - scryer-prolog.git/commit
Fix bug where -t argument was processed as filename
authorJ.J. Tolton <[email protected]>
Fri, 7 Nov 2025 00:39:21 +0000 (19:39 -0500)
committerJ.J. Tolton <[email protected]>
Sun, 9 Nov 2025 17:44:48 +0000 (12:44 -0500)
commit31247545c3331ffff00368802f1e36abd4735c99
tree078b172cf12175539a784880daaf1ff7494bfba7
parent15d112485cab49b5df41f377835be8bc51ba488f
Fix bug where -t argument was processed as filename

Fixed issue where `scryer-prolog -t halt` would try to load "halt.pl"
as a file instead of just using halt as the custom toplevel.

The bug was caused by an extra clause `delegate_task([], []).` that
would return control to the calling context instead of continuing to
start_toplevel. This caused the argument processing in delegate_task
to continue and treat the already-consumed toplevel argument as a
filename.

Removing this clause ensures that delegate_task([], Goals0) always
proceeds to load initialization files and start the toplevel, fixing
the double-processing bug.

Co-Authored-By: J.J.'s Robot <[email protected]>
src/toplevel.pl