Commit 81d217ae authored by Valentin Reis's avatar Valentin Reis

return the right output dir on failure

parent ae2618f1
Pipeline #5887 passed with stages
in 27 seconds
......@@ -358,7 +358,7 @@ setupSystem target sa = do
when (isTarget target) $ setupNodeOs envVars
return (envVars, varXDG_CACHE_HOME)
return (envVars, varTMPDIR)
where
getVars :: [Text] -> IO [(Text, Text)]
getVars vars = catMaybes <$> mapM maybeGet vars
......@@ -409,7 +409,7 @@ nixArguments target ArgsCommon {..} =
wrap :: NixCommand -> Text -> ArgsCommon -> IO ()
wrap nixCommand target sa@ArgsCommon {..} = do
when (verbosity == Verbose) $ print sa
(envVars, tmpXDGHOME) <- setupSystem target sa
(envVars, tmpDir) <- setupSystem target sa
putText $ nixc <> " " <> T.unwords arglist
case nixCommand of
NixShell -> executeFile (toS nixc) True (fmap toS arglist) Nothing
......@@ -421,7 +421,7 @@ wrap nixCommand target sa@ArgsCommon {..} = do
>>= \case
ExitSuccess -> copySuccess "/tmp/papa"
ExitFailure _ ->
copyFailure (toS tmpXDGHOME) >> die "build failed."
copyFailure (toS tmpDir) >> die "build failed."
where
copySuccess source =
runProcessVerbose verbosity "cp" ["-r", source, "./result"] []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment