Skip to content

Commit 8e61593

Browse files
clydinKeen Yee Liau
authored andcommitted
fix(@angular-devkit/core): handle async host exceptions for workspace isDirectory/isFile
1 parent ad45083 commit 8e61593

File tree

1 file changed

+2
-2
lines changed
  • packages/angular_devkit/core/src/workspace

1 file changed

+2
-2
lines changed

packages/angular_devkit/core/src/workspace/host.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ export function createWorkspaceHost(host: virtualFs.Host): WorkspaceHost {
3030
},
3131
async isDirectory(path: string): Promise<boolean> {
3232
try {
33-
return host.isDirectory(normalize(path)).toPromise();
33+
return await host.isDirectory(normalize(path)).toPromise();
3434
} catch {
3535
// some hosts throw if path does not exist
3636
return false;
3737
}
3838
},
3939
async isFile(path: string): Promise<boolean> {
4040
try {
41-
return host.isFile(normalize(path)).toPromise();
41+
return await host.isFile(normalize(path)).toPromise();
4242
} catch {
4343
// some hosts throw if path does not exist
4444
return false;

0 commit comments

Comments
 (0)