aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/command/install.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-12-03 02:09:57 -0400
committerEduardo Julian2020-12-03 02:09:57 -0400
commit0205e5146b50ab066d152fccda0fc8cef4eef852 (patch)
treeda2d89132da8f09344e26db78d0e43ca1095ee7f /stdlib/source/program/aedifex/command/install.lux
parent28c724857d76afdc40b5b036f415cc151eb66263 (diff)
Detect duplicate files coming from dependencies.
Diffstat (limited to 'stdlib/source/program/aedifex/command/install.lux')
-rw-r--r--stdlib/source/program/aedifex/command/install.lux35
1 files changed, 20 insertions, 15 deletions
diff --git a/stdlib/source/program/aedifex/command/install.lux b/stdlib/source/program/aedifex/command/install.lux
index b152bc66c..327a0c119 100644
--- a/stdlib/source/program/aedifex/command/install.lux
+++ b/stdlib/source/program/aedifex/command/install.lux
@@ -21,18 +21,21 @@
["." tar]
["." xml]]]
[world
- ["." file (#+ Path File)]]]
+ ["." file (#+ Path File)]
+ ["." console (#+ Console)]]]
[program
[compositor
["." export]]]
- ["." /// #_
- ["/" profile (#+ Profile)]
- ["#." action (#+ Action)]
- ["#." command (#+ Command)]
- ["#." local]
- ["#." pom]
- ["#." artifact (#+ Artifact)
- ["#/." extension]]])
+ ["." // #_
+ ["#." clean]
+ ["/#" // #_
+ ["/" profile (#+ Profile)]
+ ["#." action (#+ Action)]
+ ["#." command (#+ Command)]
+ ["#." local]
+ ["#." pom]
+ ["#." artifact (#+ Artifact)
+ ["#/." extension]]]])
(def: (save! system content file)
(-> (file.System Promise) Binary Path (Promise (Try Any)))
@@ -41,8 +44,11 @@
(file.get-file promise.monad system file))]
(!.use (\ file over-write) [content])))
-(def: #export (do! system profile)
- (-> (file.System Promise) (Command Any))
+(def: #export failure
+ "Failure: No 'identity' defined for the project.")
+
+(def: #export (do! console system profile)
+ (-> (Console Promise) (file.System Promise) (Command Any))
(case (get@ #/.identity profile)
(#.Some identity)
(do ///action.monad
@@ -54,9 +60,8 @@
(format artifact-name ///artifact/extension.lux-library))
pom (\ promise.monad wrap (///pom.write profile))
_ (..save! system (|> pom (\ xml.codec encode) encoding.to-utf8)
- (format artifact-name ///artifact/extension.pom))
- #let [_ (log! "Successfully installed locally!")]]
- (wrap []))
+ (format artifact-name ///artifact/extension.pom))]
+ (console.write-line //clean.success console))
_
- (\ promise.monad wrap (exception.throw /.no-identity []))))
+ (console.write-line ..failure console)))