Skip to content

Commit 05aa222

Browse files
authored
Prevent watcher from crashing on first run (#24)
1 parent d99d151 commit 05aa222

File tree

1 file changed

+1
-0
lines changed
  • packages/utils/atlaspack-watcher-watchman-js/src

1 file changed

+1
-0
lines changed

packages/utils/atlaspack-watcher-watchman-js/src/wrapper.js

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export class AtlaspackWatcherWatchmanJS implements Watcher {
100100
await this.init(dir);
101101

102102
const response = await this.commandAsync(['clock', dir]);
103+
fs.mkdirSync(path.dirname(snapshot), {recursive: true});
103104
fs.writeFileSync(snapshot, response.clock, {
104105
encoding: 'utf-8',
105106
});

0 commit comments

Comments
 (0)