Quote arguments when executing in a shell (#118)
* Quote arguments when executing in a shell Fixes #107 * Parse quotes in `tmux_arguments` This makes it possible to encode spaces in arguments. Maybe the config value should be an array instead? * Print error causes Co-authored-by: Thomas Schönauer <37108907+DottoDev@users.noreply.github.com>
This commit is contained in:
@@ -79,7 +79,7 @@ fn run() -> Result<()> {
|
||||
if config.run_in_tmux() && env::var("TOPGRADE_INSIDE_TMUX").is_err() {
|
||||
#[cfg(unix)]
|
||||
{
|
||||
tmux::run_in_tmux(config.tmux_arguments());
|
||||
tmux::run_in_tmux(config.tmux_arguments()?);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -524,7 +524,10 @@ fn main() {
|
||||
.is_some());
|
||||
|
||||
if !skip_print {
|
||||
println!("Error: {}", error);
|
||||
// The `Debug` implementation of `anyhow::Result` prints a multi-line
|
||||
// error message that includes all the 'causes' added with
|
||||
// `.with_context(...)` calls.
|
||||
println!("Error: {:?}", error);
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user