From 0205e5146b50ab066d152fccda0fc8cef4eef852 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 3 Dec 2020 02:09:57 -0400 Subject: Detect duplicate files coming from dependencies. --- stdlib/source/program/aedifex/command/install.lux | 35 +++++++++++++---------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'stdlib/source/program/aedifex/command/install.lux') 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))) -- cgit v1.2.3