Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
argonix
Commits
81d217ae
Commit
81d217ae
authored
Mar 06, 2019
by
Valentin Reis
Browse files
return the right output dir on failure
parent
ae2618f1
Pipeline
#5887
passed with stages
in 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Argonix.hs
View file @
81d217ae
...
...
@@ -358,7 +358,7 @@ setupSystem target sa = do
when
(
isTarget
target
)
$
setupNodeOs
envVars
return
(
envVars
,
var
XDG_CACHE_HOME
)
return
(
envVars
,
var
TMPDIR
)
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
,
tmp
XDGHOME
)
<-
setupSystem
target
sa
(
envVars
,
tmp
Dir
)
<-
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
tmp
XDGHOME
)
>>
die
"build failed."
copyFailure
(
toS
tmp
Dir
)
>>
die
"build failed."
where
copySuccess
source
=
runProcessVerbose
verbosity
"cp"
[
"-r"
,
source
,
"./result"
]
[]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment