-
Notifications
You must be signed in to change notification settings - Fork 256
Add missing installations #1554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
79f509b
0dcbb4f
f4bcc38
232ab83
f820950
fc09fca
a0f1d9f
84ff15e
f14ff5b
e015dde
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
use crate::tool::command_builder::CommandBuilder; | ||
use crate::tool::finalize_installation_from_cmd_result; | ||
use crate::tool::installations::initialize_installation; | ||
use crate::tool::node::package_json::PackageJson; | ||
use crate::ui::ProgressBar; | ||
use crate::{tool::ToolType, ui::ProgressTask, Tool}; | ||
use anyhow::{Context, Result}; | ||
use anyhow::{bail, Context, Result}; | ||
use itertools::Itertools; | ||
use qlty_analysis::utils::fs::path_to_native_string; | ||
use serde_json::Value; | ||
|
@@ -100,10 +102,21 @@ impl Composer { | |
) | ||
.dir(install_dir) | ||
.full_env(self.env()) | ||
.stderr_to_stdout() | ||
.stdout_file(php_package.install_log_file()?); | ||
.stderr_capture() | ||
.stdout_capture() | ||
.unchecked(); // Capture output for debugging | ||
|
||
cmd.run()?; | ||
let script = format!("{:?}", cmd); | ||
debug!(script); | ||
|
||
let mut installation = initialize_installation(php_package); | ||
let result = cmd.run(); | ||
let _ = | ||
finalize_installation_from_cmd_result(php_package, &result, &mut installation, script); | ||
|
||
if result?.status.code() != Some(0) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this new behavior in this PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes previously we were just writing the cmd output to the log file here, but now that we want to capture that into installation including what happens in an error (non-zero exit code) scenario, so using |
||
bail!("Failed to install composer package file"); | ||
} | ||
|
||
Ok(()) | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.