diff options
Diffstat (limited to 'crates/shirabe')
| -rw-r--r-- | crates/shirabe/src/command/require_command.rs | 11 | ||||
| -rw-r--r-- | crates/shirabe/tests/command/require_command_test.rs | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/crates/shirabe/src/command/require_command.rs b/crates/shirabe/src/command/require_command.rs index 57445b14..2826e04b 100644 --- a/crates/shirabe/src/command/require_command.rs +++ b/crates/shirabe/src/command/require_command.rs @@ -599,17 +599,18 @@ impl Command for RequireCommand { let result = match do_update_result { Ok(result) => { let final_result = if result == 0 && (requirements_to_guess.len() as i64) > 0 { + let fixed = input + .borrow() + .get_option("fixed")? + .as_bool() + .unwrap_or(false); self.update_requirements_after_resolution( &requirements_to_guess, require_key, remove_key, sort_packages, dry_run, - input - .borrow() - .get_option("fixed")? - .as_bool() - .unwrap_or(false), + fixed, )? } else { result diff --git a/crates/shirabe/tests/command/require_command_test.rs b/crates/shirabe/tests/command/require_command_test.rs index 2ab3989b..f23a6951 100644 --- a/crates/shirabe/tests/command/require_command_test.rs +++ b/crates/shirabe/tests/command/require_command_test.rs @@ -58,10 +58,6 @@ fn test_require_throws_if_none_matches() { #[test] #[serial] -#[ignore = "the pre-operations-exec listener bug is fixed; now fails with \"RefCell already \ - borrowed\" at console_io.rs:366 (ConsoleIO::ask_question, reached via \ - ask_confirmation from RequireCommand::update_requirements_after_resolution) — a \ - re-entrant IO RefCell borrow, unrelated to event dispatching"] fn test_require_warns_if_resolved_to_feature_branch() { let composer_json = serde_json::json!({ "repositories": { @@ -114,8 +110,8 @@ Package operations: 2 installs, 0 updates, 0 removals - Installing required/pkg (dev-foo-bar) Using version dev-foo-bar for required/pkg <warning>Version dev-foo-bar looks like it may be a feature branch which is unlikely to keep working in the long run and may be in an unstable state</warning> -Are you sure you want to use this constraint (y) or would you rather abort (n) the whole operation [y,n]? . -Installation failed, reverting ./composer.json to its original content. +Are you sure you want to use this constraint (y) or would you rather abort (n) the whole operation [y,n]? \ +\nInstallation failed, reverting ./composer.json to its original content. ", app_tester.get_display() ); |
