diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-02-10 18:32:51 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2019-02-10 18:32:51 +0100 |
commit | 996de72399bdfbe2fa498d4998941c40d189c0bf (patch) | |
tree | 13e89abcc90c4b58ec1afa4bfae82c9308e9f85a /src/CabalHelper/Runtime | |
parent | f2189de2797e391124ead51eada6d57b2929c88f (diff) |
helper: Make 'version' comand part of the normal parsing logic
Diffstat (limited to 'src/CabalHelper/Runtime')
-rw-r--r-- | src/CabalHelper/Runtime/HelperMain.hs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/CabalHelper/Runtime/HelperMain.hs b/src/CabalHelper/Runtime/HelperMain.hs index 5c84cd2..d3feea2 100644 --- a/src/CabalHelper/Runtime/HelperMain.hs +++ b/src/CabalHelper/Runtime/HelperMain.hs @@ -295,15 +295,11 @@ helper_main args = do let cmds = collectCmdOptions args' - if any (["version"] `isPrefixOf`) cmds - then do - putStrLn $ - printf "using version %s of the Cabal library" (display cabalVersion) - exitSuccess - else return () - flip mapM cmds $$ \x -> do case x of + "version":[] -> + return $ Just $ ChResponseVersion ("Cabal", toDataVersion cabalVersion) + "package-id":[] -> return $ Just $ ChResponseVersion $ (,) (display (packageName gpd)) |