diff options
Diffstat (limited to 'crates/shirabe/src/installer')
| -rw-r--r-- | crates/shirabe/src/installer/binary_installer.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/shirabe/src/installer/binary_installer.rs b/crates/shirabe/src/installer/binary_installer.rs index 606e943f..9a7a2153 100644 --- a/crates/shirabe/src/installer/binary_installer.rs +++ b/crates/shirabe/src/installer/binary_installer.rs @@ -8,7 +8,7 @@ use crate::util::Filesystem; use crate::util::Platform; use crate::util::ProcessExecutor; use crate::util::Silencer; -use shirabe_pcre::{CaptureKey, Preg, PregMatchedGroups}; +use shirabe_pcre::{CaptureKey, Preg}; use shirabe_php_shim::{ PhpMixed, basename, basename_with_suffix, chmod, dirname, fclose, fgets, file_exists, file_get_contents5, file_put_contents, fopen, is_dir, is_file, is_link, php_regex, realpath, @@ -201,11 +201,9 @@ impl BinaryInstaller { } Err(_) => String::new(), }; - let mut m = PregMatchedGroups::new(); - if Preg::is_match3( + if let Some(m) = Preg::is_match3( php_regex!(r"{^#!/(?:usr/bin/env )?(?:[^/]+/)*(.+)$}m"), &line, - Some(&mut m), ) { return trim( m.get(&CaptureKey::ByIndex(1)) |
