Skip to content

Commit

Permalink
fix: normalize dry run paths in dryRunResume (#3184)
Browse files Browse the repository at this point in the history
  • Loading branch information
VerteDinde authored Mar 7, 2023
1 parent 393709d commit 1bf6626
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/api/core/src/api/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ const publish = async ({

for (const makeResult of restoredMakeResults) {
for (const makePath of makeResult.artifacts) {
if (!(await fs.pathExists(makePath))) {
throw new Error(`Attempted to resume a dry run but an artifact (${makePath}) could not be found`);
// standardize the path to artifacts across platforms
const normalizedPath = makePath.split(/\/|\\/).join(path.sep);
if (!(await fs.pathExists(normalizedPath))) {
throw new Error(`Attempted to resume a dry run but an artifact (${normalizedPath}) could not be found`);
}
}
}
Expand Down

0 comments on commit 1bf6626

Please sign in to comment.