on master help sign in
command: Fix missing space in nixCmd
commitbd4fc6d0472c6d1781ca0f91b15cebb29488288b authorElliot Cameron <eacameron@gmail.com> dateWed 22 Apr 2020, 20:47 (6 years ago) parent6d896e1
1 file changed+4−4
lib/command/src/Obelisk/Command/Nix.hs+4−4
lib/command/src/Obelisk/Command/Nix.hs+4−4
@@ -207,7 +207,7 @@ nixCmdProc' cmdCfg = (proc (T.unpack cmd) options, cmd)
207207 )
208208
209209nixCmd :: MonadObelisk m => NixCmd -> m FilePath
210−nixCmd cmdCfg = withSpinner' ("Running " <> cmd <> desc) (Just $ const $ "Built " <> desc) $ do
210+nixCmd cmdCfg = withSpinner' (T.unwords $ "Running" : cmd : desc) (Just $ const $ T.unwords $ "Built" : desc) $ do
211211 output <- readProcessAndLogStderr Debug cmdProc
212212 -- Remove final newline that Nix appends
213213 Just (outPath, '\n') <- pure $ T.unsnoc output
@@ -218,7 +218,7 @@ nixCmd cmdCfg = withSpinner' ("Running " <> cmd <> desc) (Just $ const $ "Built
218218 NixCmd_Build cfg' -> cfg' ^. nixCommonConfig
219219 NixCmd_Instantiate cfg' -> cfg' ^. nixCommonConfig
220220 path = commonCfg ^. nixCmdConfig_target . target_path
221− desc = T.pack $ mconcat $ catMaybes
222− [ ("on " <>) <$> path
223− , (\a -> " [" <> a <> "]") <$> (commonCfg ^. nixCmdConfig_target . target_attr)
221+ desc = concat $ catMaybes
222+ [ (\x -> ["on", T.pack x]) <$> path
223+ , (\a -> ["[" <> T.pack a <> "]"]) <$> (commonCfg ^. nixCmdConfig_target . target_attr)
224224 ]