mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
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>
This commit is contained in:
commit
49dbb74a0b
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ export async function getRustcId(dir: string): Promise<string> {
|
|||
|
||||
// do not memoize the result because the toolchain may change between runs
|
||||
const data = await execute(`${rustcPath} -V -v`, { cwd: dir });
|
||||
const rx = /commit-hash:\s(.*)$/m.compile();
|
||||
const rx = /commit-hash:\s(.*)$/m;
|
||||
|
||||
return rx.exec(data)![1];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue