Skip to content

Commit 5364b23

Browse files
committed
Fixes cache bug.
Signed-off-by: Eric Wang <skygragon@gmail.com>
1 parent 959c4ae commit 5364b23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/commands/cache.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ const cmd = {
3434
cmd.handler = function(argv) {
3535
session.argv = argv;
3636

37+
const name = argv.keyword;
38+
const isInteger = Number.isInteger(Number(name));
39+
3740
const caches = cache.list()
3841
.filter(function(f) {
39-
return argv.keyword.length === 0 || f.name.startsWith(argv.keyword + '.');
42+
return (name.length === 0) ||
43+
(isInteger ? f.name.startsWith(name + '.') : f.name === name);
4044
});
4145

4246
if (argv.delete) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy