Skip to content

Commit

Permalink
fix: ensure cache dir exists before writing into it (onejs#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
zetavg authored Sep 6, 2024
1 parent c01b541 commit e8c5746
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vxrn/src/utils/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ export async function readState(cacheDir: string) {

export async function writeState(cacheDir: string, state: State) {
const statePath = join(cacheDir, 'state.json')
await FSExtra.ensureDir(cacheDir)
await FSExtra.writeJSON(statePath, state)
}

0 comments on commit e8c5746

Please sign in to comment.