fix: stabilize D601 env reuse planning
This commit is contained in:
@@ -666,10 +666,20 @@ export async function hashGitPaths(repoRoot, targetRef, paths, options = {}) {
|
||||
async function hashEnvReuseInputs(repoRoot, targetRef, paths, recipe, options = {}) {
|
||||
return stableHash({
|
||||
gitPaths: await hashGitPaths(repoRoot, targetRef, paths, options),
|
||||
envRecipe: recipe
|
||||
envRecipe: envReuseIdentityRecipe(recipe)
|
||||
});
|
||||
}
|
||||
|
||||
function envReuseIdentityRecipe(recipe) {
|
||||
const identity = JSON.parse(JSON.stringify(recipe ?? {}));
|
||||
if (identity.downloadStack && typeof identity.downloadStack === "object") {
|
||||
delete identity.downloadStack.httpProxy;
|
||||
delete identity.downloadStack.httpsProxy;
|
||||
delete identity.downloadStack.noProxy;
|
||||
}
|
||||
return identity;
|
||||
}
|
||||
|
||||
export async function lastCommitForPaths(repoRoot, targetRef, paths) {
|
||||
const normalizedPaths = uniqueSorted(paths.map(normalizeRepoPath).filter(Boolean));
|
||||
if (normalizedPaths.length === 0) return null;
|
||||
|
||||
Reference in New Issue
Block a user