get rid of ctx.prefix and add run cwd kwarg

This commit is contained in:
2026-05-20 20:52:42 +02:00
parent 16d81f509f
commit f9b6036c95
2 changed files with 6 additions and 18 deletions
+1 -13
View File
@@ -1023,21 +1023,9 @@ fn plural<'a>(count: usize, singular: &'a str, plural: &'a str) -> &'a str {
if count == 1 { singular } else { plural }
}
fn prefix_for(kind: RecipeKind) -> &'static str {
match kind {
RecipeKind::Package => "/usr",
RecipeKind::HostPackage => "/usr/local",
}
}
fn phase_context_for(recipe: &Recipe) -> PhaseContext {
let files = recipe.files_dir().map(|_| "/files".to_owned());
PhaseContext::new(
source_dir_for(recipe),
prefix_for(recipe.kind()),
default_jobs(),
files,
)
PhaseContext::new(source_dir_for(recipe), default_jobs(), files)
}
fn source_dir_for(recipe: &Recipe) -> SourceDir {