Skip to content

Commit

Permalink
fix: resolve file contents properly
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Nov 24, 2024
1 parent 5fe1d15 commit 9922724
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 9922724

Please sign in to comment.