diff options
author | Melody Horn <melody@boringcactus.com> | 2024-11-13 20:34:36 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2024-11-13 20:34:36 -0700 |
commit | 33d617d53584ae534e24fbc313ca0b3cc816a103 (patch) | |
tree | 982e96dc719345ca774bd4f06f916508f0a42105 /src/makefile/command_line.rs | |
parent | c38a09eefc060f5026c74de815256658002cf427 (diff) | |
download | makers-33d617d53584ae534e24fbc313ca0b3cc816a103.tar.gz makers-33d617d53584ae534e24fbc313ca0b3cc816a103.zip |
skip leading whitespace to find command line modifiers
Diffstat (limited to 'src/makefile/command_line.rs')
-rw-r--r-- | src/makefile/command_line.rs | 5 |
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, |