diff options
| author | Joey Hess <joey@kitenet.net> | 2014-11-18 17:53:42 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-11-18 17:53:42 -0400 |
| commit | 4a0cac113cf999a58a60f7db7a11d5b0ad623699 (patch) | |
| tree | b4ec503709eb3aa89321b37a18c84f6e8c92ebb7 /src/Propellor/CmdLine.hs | |
| parent | 39b9a61591bf28b1c9c5dc18a6f668c8becb9f6e (diff) | |
fix color display when running propellor inside docker
Diffstat (limited to 'src/Propellor/CmdLine.hs')
| -rw-r--r-- | src/Propellor/CmdLine.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index e7da0a80..a79a582d 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -55,7 +55,8 @@ processCmdLine = go =<< getArgs go ("--continue":s:[]) = case readish s of Just cmdline -> return $ Continue cmdline Nothing -> errorMessage "--continue serialization failure" - go ("--chain":h:[]) = return $ Chain h + go ("--chain":h:[]) = return $ Chain h False + go ("--chain":h:b:[]) = return $ Chain h (Prelude.read b) go ("--docker":h:[]) = return $ Docker h go ("--gitpush":fin:fout:_) = return $ GitPush (Prelude.read fin) (Prelude.read fout) go (h:[]) @@ -86,7 +87,8 @@ defaultMain hostlist = do go _ (Edit field context) = editPrivData field context go _ ListFields = listPrivDataFields hostlist go _ (AddKey keyid) = addKey keyid - go _ (Chain hn) = withhost hn $ \h -> do + go _ (Chain hn isconsole) = withhost hn $ \h -> do + when isconsole forceConsole r <- runPropellor h $ ensureProperties $ hostProperties h putStrLn $ "\n" ++ show r go _ (Docker hn) = Docker.chain hn |
