Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix importing files with special characters #27484

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(core): fix importing files with special characters
  • Loading branch information
FrozenPandaz committed Aug 16, 2024
commit 2011271d05f7bddd869b83cfd9902ba6cfe954da
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ export async function prepareSourceRepo(
await rm(destinationInSource, {
recursive: true,
});
await gitClient.commit('chore(repo): prepare for import');
await gitClient.commit(
`chore(repo): move ${source} to ${relativeDestination} to prepare to be imported`
);
needsSquash = true;
} catch {}

Expand Down Expand Up @@ -118,7 +120,9 @@ export async function prepareSourceRepo(
});
}
}
await gitClient.commit('chore(repo): prepare for import 2');
await gitClient.commit(
`chore(repo): move ${source} to ${relativeDestination} to prepare to be imported`
);
if (needsSquash) {
await gitClient.squashLastTwoCommits();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/src/utils/git-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class GitRepository {
}

async move(path: string, destination: string) {
return this.execAsync(`git mv ${path} ${destination}`);
return this.execAsync(`git mv "${path}" "${destination}"`);
}

async push(ref: string, remoteName: string) {
Expand Down