From db3e864ae66da7f7d1034ae95967605144d5ec47 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 27 Jun 2021 20:09:48 -0400 Subject: Made obtaining env variables more granular + partial Lua support. --- stdlib/source/test/aedifex/command/clean.lux | 54 ++++++++++++---------------- 1 file changed, 22 insertions(+), 32 deletions(-) (limited to 'stdlib/source/test/aedifex/command/clean.lux') diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux index d98473259..705cca7f2 100644 --- a/stdlib/source/test/aedifex/command/clean.lux +++ b/stdlib/source/test/aedifex/command/clean.lux @@ -99,35 +99,25 @@ sub_files (..files (format sub_path /)) dummy @profile.random] - ($_ _.and - (wrap (do promise.monad - [#let [console (@version.echo "")] - verdict (do {! (try.with promise.monad)} - [_ (/.do! console fs (set@ #///.target #.None dummy))] - (\ ! map (text\= /.failure) - (!.use (\ console read_line) [])))] - (_.cover' [/.failure] - (try.default false verdict)))) - (wrap (do promise.monad - [#let [console (@version.echo "")] - verdict (do {! (try.with promise.monad)} - [_ (..create_directory! fs target_path direct_files) - _ (..create_directory! fs sub_path sub_files) - context_exists!/pre (..directory_exists? fs context) - target_exists!/pre (..assets_exist? fs target_path direct_files) - sub_exists!/pre (..assets_exist? fs sub_path sub_files) - _ (/.do! console fs (set@ #///.target (#.Some target_path) dummy)) - context_exists!/post (..directory_exists? fs context) - target_exists!/post (..assets_exist? fs target_path direct_files) - sub_exists!/post (..assets_exist? fs sub_path sub_files) - logging (!.use (\ console read_line) [])] - (wrap (and (and context_exists!/pre - context_exists!/post) - (and target_exists!/pre - (not target_exists!/post)) - (and sub_exists!/pre - (not sub_exists!/post)) - (text\= /.success logging))))] - (_.cover' [/.do! /.success] - (try.default false verdict)))) - )))) + (wrap (do promise.monad + [#let [console (@version.echo "")] + verdict (do {! (try.with promise.monad)} + [_ (..create_directory! fs target_path direct_files) + _ (..create_directory! fs sub_path sub_files) + context_exists!/pre (..directory_exists? fs context) + target_exists!/pre (..assets_exist? fs target_path direct_files) + sub_exists!/pre (..assets_exist? fs sub_path sub_files) + _ (/.do! console fs (set@ #///.target target_path dummy)) + context_exists!/post (..directory_exists? fs context) + target_exists!/post (..assets_exist? fs target_path direct_files) + sub_exists!/post (..assets_exist? fs sub_path sub_files) + logging (!.use (\ console read_line) [])] + (wrap (and (and context_exists!/pre + context_exists!/post) + (and target_exists!/pre + (not target_exists!/post)) + (and sub_exists!/pre + (not sub_exists!/post)) + (text\= (/.success target_path) logging))))] + (_.cover' [/.do! /.success] + (try.default false verdict))))))) -- cgit v1.2.3