clean up cli

This commit is contained in:
2026-02-12 16:45:10 -06:00
parent 0ba2783b48
commit f901332c5b
5 changed files with 32 additions and 74 deletions

View File

@@ -728,7 +728,7 @@ function report_to_overling(msg)
var program = _cell.args.program
if (!program) {
log.error('No program specified. Usage: cell <program.ce> [args...]')
log.error('No program specified. Usage: cell <program> [args...]')
os.exit(1)
}
@@ -819,7 +819,7 @@ actor_mod.setname(_cell.args.program)
var prog = _cell.args.program
if (ends_with(prog, '.cm')) {
os.print(`error: ${prog} is a module (.cm), not an actor (.ce). Run it with: cell --core <path> ${prog}\n`)
os.print(`error: ${prog} is a module (.cm), not a program (.ce)\n`)
os.exit(1)
}
if (ends_with(prog, '.ce')) prog = text(prog, 0, -3)
@@ -868,6 +868,8 @@ $_.clock(_ => {
env.use = function(path) {
var ck = 'core/' + path
if (use_cache[ck]) return use_cache[ck]
var core_mod = use_core(path)
if (core_mod) return core_mod
return shop.use(path, pkg)
}
env.args = _cell.args.arg