Fix stuff

This commit is contained in:
mitchellhamilton
2019-09-16 17:24:20 +10:00
parent 2a6d43cef5
commit 67d5b6e323
3 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -28,11 +28,12 @@ export async function getChangedPackages(cwd: string) {
let workspacesByDirectory = new Map(workspaces.map(x => [x.dir, x]));
let output = await execWithOutput("git", ["diff", "--only-names"], { cwd });
let output = await execWithOutput("git", ["diff", "--name-only"], { cwd });
let names = output.stdout.split("\n");
let changedWorkspaces: Workspace[] = [];
for (let name of names) {
let dirname = path.dirname(name);
if (name === "") continue;
let dirname = path.resolve(cwd, path.dirname(name));
let workspace = workspacesByDirectory.get(dirname);
if (workspace !== undefined) {
changedWorkspaces.push(workspace);