summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-02-28 08:58:11 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-02-28 14:23:55 +0100
commitadf1e64d23af1b428666dc94d4fee85be8807349 (patch)
treea6db86e41ffeb320ec482e490e3b3425976a0ebb
parent3c241444e8b6e1ecbc4a09cd40eca755f3cf60d3 (diff)
Use existing variable instead of hardcoding appname
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/core/imag/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/core/imag/src/main.rs b/bin/core/imag/src/main.rs
index 41757929..ea62eb7b 100644
--- a/bin/core/imag/src/main.rs
+++ b/bin/core/imag/src/main.rs
@@ -201,7 +201,7 @@ fn main() -> Result<()> {
commands
.iter()
.map(|command| {
- match Command::new(format!("imag-{}", command))
+ match Command::new(format!("{}-{}", appname, command))
.stdin(::std::process::Stdio::inherit())
.stdout(::std::process::Stdio::piped())
.stderr(::std::process::Stdio::inherit())
@@ -242,10 +242,10 @@ fn main() -> Result<()> {
let subcommand = String::from(subcommand);
let subcommand = aliases.get(&subcommand).cloned().unwrap_or(subcommand);
- debug!("Calling 'imag-{}' with args: {:?}", subcommand, subcommand_args);
+ debug!("Calling '{}-{}' with args: {:?}", appname, subcommand, subcommand_args);
// Create a Command, and pass it the gathered arguments
- match Command::new(format!("imag-{}", subcommand))
+ match Command::new(format!("{}-{}", appname, subcommand))
.stdin(Stdio::inherit())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())