aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/command/clean.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-06-27 20:09:48 -0400
committerEduardo Julian2021-06-27 20:09:48 -0400
commitdb3e864ae66da7f7d1034ae95967605144d5ec47 (patch)
tree29c51002455a2c8f7d4aa25ab13c688cfa8d60e3 /stdlib/source/test/aedifex/command/clean.lux
parentb80f79ae6b2e240949ebd709a253e21f7caf7ed3 (diff)
Made obtaining env variables more granular + partial Lua support.
Diffstat (limited to 'stdlib/source/test/aedifex/command/clean.lux')
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux54
1 files changed, 22 insertions, 32 deletions
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)))))))