提交 50cc3d61 编写于 作者: M Matt Bierner

Never edit files under `node_modules` on update paths

Workaround for #52977
上级 90b1beeb
......@@ -226,11 +226,15 @@ export class UpdateImportsOnFileRenameHandler {
const edits: Proto.FileCodeEdits[] = [];
for (const edit of response.body) {
// Workaround for https://github.com/Microsoft/vscode/issues/52675
if ((edit as Proto.FileCodeEdits).fileName.match(/[\/\\]node_modules[\/\\]/gi)) {
continue;
}
for (const change of (edit as Proto.FileCodeEdits).textChanges) {
if (change.newText.match(/\/node_modules\//gi)) {
continue;
}
}
edits.push(await this.fixEdit(edit, isDirectoryRename, oldFile, newFile));
}
return typeConverters.WorkspaceEdit.fromFileCodeEdits(this.client, edits);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册