Skip to content

Commit

Permalink
fix: print the correct fields from Outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
a-frantz committed Jan 9, 2025
1 parent 9971775 commit 54808d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion wdl-engine/src/outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct Outputs {
/// for a direct task execution.
name: Option<String>,
/// The map of output name to value.
values: IndexMap<String, Value>,
pub values: IndexMap<String, Value>,
}

impl Outputs {
Expand Down
12 changes: 6 additions & 6 deletions wdl/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub async fn analyze(
exceptions: Vec<String>,
lint: bool,
shellcheck: bool,
) -> anyhow::Result<Vec<AnalysisResult>> {
) -> Result<Vec<AnalysisResult>> {
let rules = analysis_rules();
let rules = rules
.iter()
Expand Down Expand Up @@ -108,7 +108,7 @@ pub async fn analyze(

let results = analyzer.analyze(bar.clone()).await?;

Ok(results)
anyhow::Ok(results)
}

/// Validates the inputs for a task or workflow.
Expand All @@ -117,7 +117,7 @@ pub async fn validate_inputs(
inputs: &Path,
stream: &mut codespan_reporting::term::termcolor::StandardStream,
config: &codespan_reporting::term::Config,
) -> anyhow::Result<()> {
) -> Result<()> {
if Path::new(&document).is_dir() {
bail!("expected a WDL document, found a directory");
}
Expand Down Expand Up @@ -194,7 +194,7 @@ pub async fn validate_inputs(
bail!("failed to validate inputs:\n{result}");
}

Ok(())
anyhow::Ok(())
}

/// Run a WDL task or workflow.
Expand Down Expand Up @@ -286,7 +286,7 @@ pub async fn run(
{
Ok(evaluated) => match evaluated.into_result() {
Ok(outputs) => {
println!("{}", to_string_pretty(&outputs)?);
println!("{}", to_string_pretty(&outputs.values)?);
}
Err(e) => match e {
EvaluationError::Source(diagnostic) => {
Expand Down Expand Up @@ -330,5 +330,5 @@ pub async fn run(
}
}

Ok(())
anyhow::Ok(())
}

0 comments on commit 54808d5

Please sign in to comment.