scm: clean up scm running

Split run_script / run_repl more clearly; update callers.
This commit is contained in:
Dirk-Jan C. Binnema
2025-08-25 08:31:12 +03:00
committed by Seth Ladygo
parent 5378f321f4
commit 013233c041
4 changed files with 84 additions and 80 deletions

View File

@ -73,7 +73,10 @@ cmd_scm(const Store& store, const Options& opts)
return Err(Error::Code::InvalidArgument,
"scm/guile is not available in this build");
#else
return Mu::Scm::run(store, opts, true/*blocking*/);
if (opts.scm.script_path)
return Mu::Scm::run_script(store, opts, *opts.scm.script_path);
else
return Mu::Scm::run_repl(store, opts, opts.scm.socket_path.value_or(""));
#endif /*BUILD_SCM*/
}