Skip to content

Commit

Permalink
fix(summary): no longer display non existent logfile
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed Feb 6, 2025
1 parent b965057 commit cccb437
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/run/summary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ impl<'a> RunSummary<'a> {
ui,
GREY,
" Log File\t=\t{}",
task.shared.log_file
task.shared.log_file.as_deref().unwrap_or_default()
)?;

let dependencies = if !self.monorepo {
Expand Down
3 changes: 2 additions & 1 deletion crates/turborepo-lib/src/run/summary/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ pub(crate) struct SharedTaskSummary<T> {
pub cli_arguments: Vec<String>,
pub outputs: Option<Vec<String>>,
pub excluded_outputs: Option<Vec<String>>,
pub log_file: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub log_file: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub directory: Option<String>,
pub dependencies: Vec<T>,
Expand Down
4 changes: 2 additions & 2 deletions crates/turborepo-lib/src/run/summary/task_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ impl<'a> TaskSummaryFactory<'a> {

let (dependencies, dependents) = self.dependencies_and_dependents(task_id, display_task);

let log_file = {
let log_file = task_definition.cache.then(|| {
let path = workspace_info.package_path().to_owned();
let relative_log_file = TaskDefinition::workspace_relative_log_file(task_id.task());
path.join(&relative_log_file).to_string()
};
});

Ok(SharedTaskSummary {
hash,
Expand Down

0 comments on commit cccb437

Please sign in to comment.