From 226e034b82d151ad3816f425fd7515cb40112878 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Sat, 28 Oct 2023 21:54:15 -0300 Subject: [PATCH] Fix version matching for sass compiled with dart2js --- src/tools.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools.rs b/src/tools.rs index dfdbb1ef..ff69cf41 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -157,7 +157,7 @@ impl Application { let text = text.trim(); let formatted_version = match self { Application::Sass => text - .lines() + .split_whitespace() .next() .with_context(|| format!("missing or malformed version output: {}", text))? .to_owned(), @@ -651,6 +651,7 @@ mod tests { ); table_test_format_version!(sass_pre_compiled, Application::Sass, "1.37.5", "1.37.5"); + table_test_format_version!(sass_pre_compiled_dart2js, Application::Sass, "1.37.5 compiled with dart2js 2.18.4", "1.37.5"); table_test_format_version!( tailwindcss_pre_compiled, Application::TailwindCss,