Skip to content

Commit

Permalink
Fix cache-location typo (fixes #624)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed May 6, 2024
1 parent 2da8299 commit 6481d12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/knip/src/CacheConsultant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { cwd, join } from './util/path.js';

const defaultCacheLocation = join(cwd, 'node_modules', '.cache', 'knip');

const { cache: isCache = false, cacheLocation = defaultCacheLocation, watch: isWatch = false } = parsedArgValues;
const { cache: isCache = false, watch: isWatch = false } = parsedArgValues;

const cacheLocation = parsedArgValues['cache-location'] ?? defaultCacheLocation;

interface FD<T> extends FileDescriptor {
readonly meta?: {
Expand Down
2 changes: 1 addition & 1 deletion packages/knip/src/util/cli-arguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ try {
parsedArgs = parseArgs({
options: {
cache: { type: 'boolean' },
cacheLocation: { type: 'string' },
'cache-location': { type: 'string' },
config: { type: 'string', short: 'c' },
debug: { type: 'boolean', short: 'd' },
dependencies: { type: 'boolean' },
Expand Down

0 comments on commit 6481d12

Please sign in to comment.