Skip to content

Commit 49dbb74

Browse files
bors[bot]lnicola
andauthored
Merge #9882
9882: fix: Don't call deprecated `compile` regex method r=lnicola a=lnicola Fixes #9872 It looks like `compile` expects to be called like `RegExp.compile("foo", "m")`, so calling `.compile()` on an existing regex replaces it with an empty one. Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2 parents c5ddc35 + 743b016 commit 49dbb74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editors/code/src/toolchain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export async function getRustcId(dir: string): Promise<string> {
133133

134134
// do not memoize the result because the toolchain may change between runs
135135
const data = await execute(`${rustcPath} -V -v`, { cwd: dir });
136-
const rx = /commit-hash:\s(.*)$/m.compile();
136+
const rx = /commit-hash:\s(.*)$/m;
137137

138138
return rx.exec(data)![1];
139139
}

0 commit comments

Comments
 (0)