From e6d1dfa775ba31bf6ed9378e2d4a5eba24969cef Mon Sep 17 00:00:00 2001 From: Nicholas Wolverson Date: Tue, 1 Aug 2017 22:25:53 +0100 Subject: [PATCH] Restore update command (#46) --- app/Main.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Main.hs b/app/Main.hs index f2fc97e..28d1300 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -237,6 +237,12 @@ initialize setAndSource = do packageNameFromPWD = either (const untitledPackageName) id . mkPackageName +update :: IO () +update = do + pkg <- readPackageFile + updateImpl pkg + echoT "Update complete" + install :: String -> IO () install pkgName' = do pkg <- readPackageFile @@ -462,6 +468,9 @@ main = do <*> optional (fromString <$> source)) Opts.<**> Opts.helper) (Opts.progDesc "Initialize a new package")) + , Opts.command "update" + (Opts.info (pure update) + (Opts.progDesc "Update dependencies")) , Opts.command "uninstall" (Opts.info (uninstall <$> pkg Opts.<**> Opts.helper) (Opts.progDesc "Uninstall the named package"))