Skip to content

Commit

Permalink
fix: resolve file contents properly in test section (#1214)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv authored Nov 26, 2024
1 parent d12b826 commit 72e1af1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/package_test/serialize_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,19 @@ pub(crate) fn write_test_files(
&output.build_configuration.directories.recipe_dir,
Some(default_jinja_context(output)),
&["sh", "bat"],
);
)?;

// Replace with rendered contents
if let Ok(ResolvedScriptContents::Inline(contents)) = contents {
command_test.script.content = ScriptContent::Command(contents)
match contents {
ResolvedScriptContents::Inline(contents) => {
command_test.script.content = ScriptContent::Command(contents)
}
ResolvedScriptContents::Path(_path, contents) => {
command_test.script.content = ScriptContent::Command(contents);
}
ResolvedScriptContents::Missing => {
command_test.script.content = ScriptContent::Command("".to_string());
}
}
}
}
Expand Down

0 comments on commit 72e1af1

Please sign in to comment.