Skip to content

Commit

Permalink
fix(@angular-devkit/core): record host should stat backing host
Browse files Browse the repository at this point in the history
  • Loading branch information
clydin authored and alexeagle committed Oct 5, 2018
1 parent da7daef commit 9297eb5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/angular_devkit/core/src/virtual-fs/host/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
HostCapabilities,
HostWatchOptions,
ReadonlyHost,
Stats,
} from './interface';
import { SimpleMemoryHost } from './memory';

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

stat(path: Path): Observable<Stats | null> | null {
return this._exists(path)
? super.stat(path)
: ((this.willDelete(path) || this.willRename(path)) ? of(null) : this._back.stat(path));
}

watch(path: Path, options?: HostWatchOptions) {
// Watching not supported.
return null;
Expand Down

0 comments on commit 9297eb5

Please sign in to comment.