Skip to content

Commit

Permalink
repl: mkdirp the .tap dir if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 12, 2023
1 parent acfae01 commit 46e2bbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/run/src/repl/index.ts
Expand Up @@ -2,6 +2,7 @@ import { LoadedConfig } from '@tapjs/config'
import { ProcessInfo, ProcessInfoNode } from '@tapjs/processinfo'
import chalk from 'chalk'
import { FSWatcher, watch } from 'chokidar'
import { mkdirpSync } from 'mkdirp'
import { ChildProcess, spawn, SpawnOptions } from 'node:child_process'
import { readFile } from 'node:fs/promises'
import { isAbsolute, relative, resolve } from 'node:path'
Expand Down Expand Up @@ -217,6 +218,7 @@ export class Repl {

// ignore the callback, it's best-effort
/* c8 ignore start */
mkdirpSync(this.dir)
this.repl.setupHistory(
resolve(this.dir, 'repl_history'),
() => {}
Expand Down

0 comments on commit 46e2bbb

Please sign in to comment.