Skip to content

Commit

Permalink
dx(cache): improve clean edge-case errors with quotes (#394)
Browse files Browse the repository at this point in the history
- follows the style of most of the other errors in the codebase
  - when referencing a variable, file path, etc, put quotes around it in the output
    - so it's easier to distinguish in the log
  • Loading branch information
agilgur5 authored Aug 8, 2022
1 parent e5e3ccd commit d17864d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tscache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ export class TsCache
/* istanbul ignore if -- this is a safety check, but shouldn't happen when using a dedicated cache dir */
if (!e.startsWith(this.cachePrefix))
{
this.context.debug(`skipping cleaning ${dir} as it does not have prefix ${this.cachePrefix}`);
this.context.debug(`skipping cleaning '${dir}' as it does not have prefix '${this.cachePrefix}'`);
return;
}

/* istanbul ignore if -- this is a safety check, but should never happen in normal usage */
if (!fs.statSync(dir).isDirectory)
{
this.context.debug(`skipping cleaning ${dir} as it is not a directory`);
this.context.debug(`skipping cleaning '${dir}' as it is not a directory`);
return;
}

Expand Down

0 comments on commit d17864d

Please sign in to comment.