Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
argotk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argo
argotk
Commits
7cea5526
Commit
7cea5526
authored
Mar 22, 2019
by
Valentin Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sudo call in argotk
parent
106eb84e
Pipeline
#6136
passed with stages
in 2 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
src/Argo/Stack.hs
src/Argo/Stack.hs
+6
-5
src/Argo/Utils.hs
src/Argo/Utils.hs
+1
-1
No files found.
src/Argo/Stack.hs
View file @
7cea5526
...
...
@@ -47,6 +47,7 @@ import System.Process.Typed ( readProcessStdout_
,
proc
,
shell
,
setEnv
,
setEnvInherit
)
import
Text.Show.Pretty
...
...
@@ -57,7 +58,7 @@ cleanLeftovers (WorkingDirectory wd) = do
putText
"Cleaning output directory."
runProcess
(
shell
$
toS
$
"rm -rf "
<>
wd
)
>>=
\
case
ExitSuccess
->
putText
"Cleaned output directory"
ExitFailure
_
->
putText
"Failed running rm -rf on the output directory."
ExitFailure
_
->
die
"Failed running rm -rf on the output directory."
where
socklist
=
[
"/tmp/nrm-downstream-in"
...
...
@@ -97,12 +98,12 @@ prepareDaemon out stdErr test v powercap vars = do
putText
"Contents of .argo_nodeos_config_exit_message: "
*>
(
readFile
".argo_nodeos_config_exit_message"
>>=
print
)
False
->
die
(
"argo_nodeos_config failed with exit code "
<>
show
n
)
cleanContainers
::
FilePath
->
IO
()
cleanContainers
::
Text
->
IO
()
cleanContainers
argo_nodeos_config
=
runProcess
(
setEnv
(
castArg
<$>
vars
)
$
proc
"sudo"
[
argo_nodeos_config
,
"--clean_config=kill_content:true"
]
(
proc
(
toS
argo_nodeos_config
)
$
toS
<$>
[
argo_nodeos_config
,
"--clean_config=kill_content:true"
]
)
>>=
\
case
ExitFailure
n
->
nodeOsFailure
n
...
...
src/Argo/Utils.hs
View file @
7cea5526
...
...
@@ -92,7 +92,7 @@ myWhich str =
""
->
die
$
"Argo `"
<>
str
<>
"` not in $PATH."
p
->
printInfo
(
"Found "
<>
str
<>
" at "
<>
p
)
$>
p
sudoRemoveFile
::
(
Text
->
IO
()
)
->
Text
->
Text
->
IO
()
sudoRemoveFile
::
(
Text
->
IO
()
)
->
Text
->
Text
->
IO
()
sudoRemoveFile
printer
desc
filePath
=
do
foundSocket
<-
doesFileExist
$
toS
filePath
when
foundSocket
$
go
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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