Skip to content

Commit

Permalink
fix stack traces in fs.promises.realpath invocations
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed Sep 28, 2024
1 parent 5ca896b commit cc151a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ module.exports.get_git = function(EXT_ID, logger, { on_repo_external_state_chang
},
get_selected_repo_index: () => selected_repo_index,
async get_repo_index_for_uri(/** @type {vscode.Uri} */ uri) {
let uri_path = await realpath(uri.path)
let uri_path = await realpath(uri.path).catch(e => { throw new Error(e) /* https://github.com/nodejs/node/issues/30944 */ })
return ((await Promise.all(api.repositories.map(async (repo, index) => {
let repo_path = await realpath(repo.rootUri.path)
let repo_path = await realpath(repo.rootUri.path).catch(e => { throw new Error(e) /* https://github.com/nodejs/node/issues/30944 */ })
return { repo_path, index }
})))).filter(({ repo_path }) => {
// if repo includes uri: stackoverflow.com/q/37521893
Expand Down

0 comments on commit cc151a6

Please sign in to comment.