Skip to content

Commit

Permalink
Improve searchForDevontainerJsonFiles to not block server (#14563)
Browse files Browse the repository at this point in the history
* improve searchForDevontainerJsonFiles to not block server

Signed-off-by: Jonah Iden <[email protected]>

* lint

Signed-off-by: Jonah Iden <[email protected]>

---------

Signed-off-by: Jonah Iden <[email protected]>
  • Loading branch information
jonah-iden authored Dec 10, 2024
1 parent 5e81662 commit fb09901
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class DevContainerFileService {
}

protected async searchForDevontainerJsonFiles(directory: string, depth: number): Promise<string[]> {
if (depth < 0 || !fs.existsSync(directory)) {
if (depth < 0 || !await fs.pathExists(directory)) {
return [];
}
const filesPaths = (await fs.readdir(directory)).map(file => new Path(directory).join(file).fsPath());
Expand Down

0 comments on commit fb09901

Please sign in to comment.