Skip to content

Commit

Permalink
cleanup after ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
amartin-isp committed Oct 12, 2024
1 parent 151cea7 commit cd1eea3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build-workspace-matrix/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export async function getWorkspaces(input: {
if (input.eventName === "workflow_dispatch") {
return [input.dispatchWorkspace];
}

const cwd = process.cwd();
if (input.workingDirectory) {
process.chdir(input.workingDirectory);
}
Expand Down Expand Up @@ -92,6 +94,7 @@ export async function getWorkspaces(input: {
}
}

process.chdir(cwd);
return workspaces.filter((w) => changedFilesList.some((f) => f.startsWith(w)) || workspacesWithChangedDependencies.has(w));
}

Expand Down

0 comments on commit cd1eea3

Please sign in to comment.