removing duplicate revomal of program-name in (chibi app)

This commit is contained in:
Alex Shinn 2018-12-28 23:48:13 +08:00
parent 479efcdc33
commit b782ee575b

View file

@ -125,7 +125,7 @@
(let ((args (or (and (pair? o) (car o)) (command-line))) (let ((args (or (and (pair? o) (car o)) (command-line)))
(config (and (pair? o) (pair? (cdr o)) (cadr o)))) (config (and (pair? o) (pair? (cdr o)) (cadr o))))
(cond (cond
((parse-app '() (cdr spec) '() args config #f #f) ((parse-app '() (cdr spec) '() (cdr args) config #f #f)
=> (lambda (v) => (lambda (v)
(let ((proc (vector-ref v 0)) (let ((proc (vector-ref v 0))
(cfg (vector-ref v 1)) (cfg (vector-ref v 1))
@ -136,7 +136,7 @@
(let ((res (apply proc cfg spec args))) (let ((res (apply proc cfg spec args)))
(if end (end cfg)) (if end (end cfg))
res)))) res))))
((null? args) ((null? (cdr args))
(app-help spec args) (app-help spec args)
(error "Expected a command")) (error "Expected a command"))
(else (else