aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/repository_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/repository_command.rs')
-rw-r--r--crates/shirabe/src/command/repository_command.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/shirabe/src/command/repository_command.rs b/crates/shirabe/src/command/repository_command.rs
index 4853d3d3..bbd1eace 100644
--- a/crates/shirabe/src/command/repository_command.rs
+++ b/crates/shirabe/src/command/repository_command.rs
@@ -10,10 +10,9 @@ use crate::console::input::InputOption;
use crate::io::IOInterfaceImmutable;
use crate::json::JsonFile;
use indexmap::IndexMap;
-use shirabe_pcre::Preg;
use shirabe_php_shim::{
InvalidArgumentException, PhpMixed, RuntimeException, impl_php_class, parse_url, php_regex,
- strtolower,
+ preg_match2, strtolower,
};
use shirabe_symfony_console::command::Command;
use shirabe_symfony_console::input::InputInterface;
@@ -369,7 +368,9 @@ impl Command for RepositoryCommand {
.into());
}
let arg1_str = arg1.as_deref().unwrap();
- let repo_config: PhpMixed = if Preg::is_match(php_regex!(r"{^\s*\{}"), arg1_str) {
+ let repo_config: PhpMixed = if preg_match2(php_regex!(r"{^\s*\{}"), arg1_str, 0)
+ .is_some()
+ {
JsonFile::parse_json(Some(arg1_str), None)?
} else {
if arg2.is_none() {