Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PERE Alexandre
orchestra
Commits
aa15ed9d
Commit
aa15ed9d
authored
Dec 03, 2019
by
Alexandre Pere
Browse files
Fixes bug
parent
ea619fdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
runaway-cli/src/subcommands/exec.rs
View file @
aa15ed9d
...
...
@@ -32,7 +32,6 @@ use tracing::{self, info, error, debug};
/// Executes a single execution of the script with the command arguments and returns exit code.
pub
fn
exec
(
matches
:
clap
::
ArgMatches
)
->
Result
<
Exit
,
Exit
>
{
// We initialize the logger
misc
::
init_logger
(
&
matches
);
...
...
@@ -60,7 +59,10 @@ pub fn exec(matches: clap::ArgMatches) -> Result<Exit, Exit>{
}
push_env
(
&
mut
store
,
"RUNAWAY_LEAVE"
,
format!
(
"{}"
,
leave
));
debug!
(
"Leave option set to {}"
,
leave
);
let
parameters
=
matches
.value_of
(
"ARGUMENTS"
)
.unwrap_or
(
""
)
.to_owned
();
let
parameters
=
match
matches
.values_of
(
"ARGUMENTS"
){
Some
(
it
)
=>
it
.fold
(
String
::
new
(),
|
acc
,
arg
|
format!
(
"{} {}"
,
acc
,
arg
)),
None
=>
""
.to_owned
()
};
push_env
(
&
mut
store
,
"RUNAWAY_ARGUMENTS"
,
parameters
.clone
());
debug!
(
"Arguments set to {}"
,
parameters
);
let
script
=
PathBuf
::
from
(
matches
.value_of
(
"SCRIPT"
)
.unwrap
());
...
...
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