summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Rodarmor <casey@rodarmor.com>2024-01-01 17:50:18 -0800
committerGitHub <noreply@github.com>2024-01-02 01:50:18 +0000
commit1bfed56e5e8ccda09b4d7da7d22635b57ba4eb32 (patch)
treec0871ecdb074580e5f45d51d7d6241110d8ba2e6
parent87925f293eab494ae6c5d310004c32529f2b5685 (diff)
Make sigil stripping from recipe lines less incomprehensible (#1812)1.22.0
-rw-r--r--src/recipe.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/recipe.rs b/src/recipe.rs
index 6f039273..7acd1cea 100644
--- a/src/recipe.rs
+++ b/src/recipe.rs
@@ -195,13 +195,9 @@ impl<'src, D> Recipe<'src, D> {
let mut command = evaluated.as_str();
- if quiet_command {
- command = &command[1..];
- }
+ let sigils = usize::from(infallible_command) + usize::from(quiet_command);
- if infallible_command {
- command = &command[1..];
- }
+ command = &command[sigils..];
if command.is_empty() {
continue;