diff options
author | Chuck <chuck@intelligence.org> | 2019-09-05 11:11:12 -0700 |
---|---|---|
committer | jao <jao@gnu.org> | 2019-09-06 06:05:14 +0100 |
commit | e4b0a5ed59c168d1802648659e087a8191589c1f (patch) | |
tree | f81e7a0054e2e71e5f84b207853449237ba2982d /src/Xmobar/App/Compile.hs | |
parent | 3105055dd2ff93b46e7e38a4bb697b284be338f3 (diff) | |
download | xmobar-e4b0a5ed59c168d1802648659e087a8191589c1f.tar.gz xmobar-e4b0a5ed59c168d1802648659e087a8191589c1f.tar.bz2 |
Write error log to data dir, not conf dir
Write xmobar.errors to XMOBAR_DATA_DIR, not XMOBAR_CONFIG_DIR. This
allows XMOBAR_CONFIG_DIR to be read-only. This brings xmobar into
alignment with how xmonad manages its analogous directories (before this
change, a read-only DATA dir worked with xmonad but not with xmobar).
Diffstat (limited to 'src/Xmobar/App/Compile.hs')
-rw-r--r-- | src/Xmobar/App/Compile.hs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Xmobar/App/Compile.hs b/src/Xmobar/App/Compile.hs index 0a763b4..bcb18d0 100644 --- a/src/Xmobar/App/Compile.hs +++ b/src/Xmobar/App/Compile.hs @@ -131,13 +131,13 @@ trace verb msg = when verb (liftIO $ hPutStrLn stderr msg) -- -- 'False' is returned if there are compilation errors. -- -recompile :: MonadIO m => String -> String -> Bool -> Bool -> m Bool -recompile dir execName force verb = liftIO $ do - let bin = dir </> execName - err = dir </> (execName ++ ".errors") - src = dir </> (execName ++ ".hs") - lib = dir </> "lib" - script = dir </> "build" +recompile :: MonadIO m => String -> String -> String -> Bool -> Bool -> m Bool +recompile confDir dataDir execName force verb = liftIO $ do + let bin = confDir </> execName + err = dataDir </> (execName ++ ".errors") + src = confDir </> (execName ++ ".hs") + lib = confDir </> "lib" + script = confDir </> "build" useScript <- checkBuildScript verb script sc <- if useScript || force then return True @@ -149,8 +149,8 @@ recompile dir execName force verb = liftIO $ do \errHandle -> waitForProcess =<< if useScript - then runScript script bin dir errHandle - else runGHC bin dir errHandle + then runScript script bin confDir errHandle + else runGHC bin confDir errHandle installSignalHandlers if status == ExitSuccess then trace verb "Xmobar recompilation process exited with success!" |