diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex.lux | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/stdlib/source/program/aedifex.lux b/stdlib/source/program/aedifex.lux index f5ec4caf2..4cfc376d3 100644 --- a/stdlib/source/program/aedifex.lux +++ b/stdlib/source/program/aedifex.lux @@ -31,7 +31,7 @@ [lux ["." syntax]]]]] [world - ["." shell (#+ Shell)] + ["." shell (#+ Exit Shell)] ["." console (#+ Console)] ["." program (#+ Program)] ["." file (#+ Path) @@ -72,7 +72,7 @@ (def: (with_dependencies program console command profile) (All [a] (-> (Program Promise) (Console Promise) - (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command a)) + (-> (Console Promise) (Program Promise) (file.System Promise) (Shell Promise) Resolution (Command [Exit a])) (Command a))) (do /action.monad [resolution (/command/deps.do! console @@ -80,8 +80,17 @@ (..repositories profile) (|>> (/repository/remote.repository http.default #.None) /repository.async) - profile)] - ((command console program (file.async file.default) (shell.async shell.default) resolution) profile))) + profile) + [exit_code output] ((command console program (file.async file.default) (shell.async shell.default) resolution) profile) + _ (case exit_code + (^ (static shell.normal)) + (wrap []) + + _ + (do promise.monad + [_ (\ program exit exit_code)] + (wrap (#try.Failure ""))))] + (wrap output))) (exception: (cannot_find_repository {repository Text} {options (Dictionary Text Address)}) |