aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2024-11-13 20:34:36 -0700
committerMelody Horn <melody@boringcactus.com>2024-11-13 20:34:36 -0700
commit33d617d53584ae534e24fbc313ca0b3cc816a103 (patch)
tree982e96dc719345ca774bd4f06f916508f0a42105 /src
parentc38a09eefc060f5026c74de815256658002cf427 (diff)
downloadmakers-33d617d53584ae534e24fbc313ca0b3cc816a103.tar.gz
makers-33d617d53584ae534e24fbc313ca0b3cc816a103.zip
skip leading whitespace to find command line modifiers
Diffstat (limited to 'src')
-rw-r--r--src/makefile/command_line.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/makefile/command_line.rs b/src/makefile/command_line.rs
index c75c854..9641941 100644
--- a/src/makefile/command_line.rs
+++ b/src/makefile/command_line.rs
@@ -87,7 +87,10 @@ impl CommandLine {
// sometimes this is defined in macros rather than statically
let execution_line: String = {
- let mut line_chars = execution_line.chars().peekable();
+ let mut line_chars = execution_line
+ .chars()
+ .skip_while(char::is_ascii_whitespace)
+ .peekable();
while let Some(x) = line_chars.next_if(|x| matches!(x, '-' | '@' | '+')) {
match x {
'-' => ignore_errors = true,