Skip to content

Commit ad0e808

Browse files
committed
fix(@angular-devkit/core): record host should stat backing host
1 parent 71d25a5 commit ad0e808

File tree

1 file changed

+7
-0
lines changed
  • packages/angular_devkit/core/src/virtual-fs/host

1 file changed

+7
-0
lines changed

packages/angular_devkit/core/src/virtual-fs/host/record.ts

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
HostCapabilities,
2727
HostWatchOptions,
2828
ReadonlyHost,
29+
Stats,
2930
} from './interface';
3031
import { SimpleMemoryHost } from './memory';
3132

@@ -366,6 +367,12 @@ export class CordHost extends SimpleMemoryHost {
366367
: ((this.willDelete(path) || this.willRename(path)) ? of(false) : this._back.isFile(path));
367368
}
368369

370+
stat(path: Path): Observable<Stats | null> | null {
371+
return this._exists(path)
372+
? super.stat(path)
373+
: ((this.willDelete(path) || this.willRename(path)) ? of(null) : this._back.stat(path));
374+
}
375+
369376
watch(path: Path, options?: HostWatchOptions) {
370377
// Watching not supported.
371378
return null;

0 commit comments

Comments
 (0)