Skip to content

Commit 33b8ebc

Browse files
committed
Fix only touch actual external paths
1 parent 1cb13a9 commit 33b8ebc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/api.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ export async function generateCompileCommands(directory: string, customCompileCo
6262
}
6363

6464
// move "external" symlink out of WORKSPACE
65-
await replacePattern("external", "../external", compileCommandsFile).then(() => {
66-
logger.info(`Replaced 'external' in compile_commands.json with '../external'`);
65+
["\"", "I"].forEach(async prefix => {
66+
await replacePattern(`${prefix}external`, `${prefix}../external`, compileCommandsFile).then(() => {
67+
logger.info(`Replaced '${prefix}external' in compile_commands.json with '${prefix}../external'`);
68+
});
6769
});
70+
6871
const destinationExternal = path.join(bazelWorkspace, "/../external");
6972
if (fse.existsSync(destinationExternal)) {
7073
fse.removeSync(destinationExternal);

0 commit comments

Comments
 (0)