Skip to content

Commit b728558

Browse files
committed
mbed cache -h will now print the default location as well.
The reported cache location will now contain "mbed-cache" additional sub-folder.
1 parent c5a0d01 commit b728558

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mbed/mbed.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,7 @@ def toolchain_(name=None, global_cfg=False, supported=False):
27822782
@subcommand('cache',
27832783
dict(name='on', nargs='?', help='Turn repository caching on. Will use either the default or the user specified cache directory.'),
27842784
dict(name='off', nargs='?', help='Turn repository caching off. Note that this doesn\'t purge cached repositories. See "purge".'),
2785-
dict(name='dir', nargs='?', help='Set cache directory. Set to "default" to let mbed CLI determine the cache directory location. Typically this is "~/.mbed/mbed-cache/" on UNIX, or "%%userprofile%%/.mbed/mbed-cache/" on Windows.'),
2785+
dict(name='dir', nargs='?', help='Set cache directory. Set to "default" to let mbed CLI determine the cache directory location (%s/mbed-cache/).' % Global().path),
27862786
dict(name='ls', nargs='?', help='List cached repositories and their sizes.'),
27872787
dict(name='purge', nargs='?', help='Purge cached repositories. Note that this doesn\'t turn caching off'),
27882788
help='Repository cache management\n\n',
@@ -2844,8 +2844,9 @@ def get_size_(path):
28442844
action("Purge complete!")
28452845
elif cmd == "false":
28462846
action("Repository cache is %s." % str(cfg['cache']).upper())
2847-
action("Cache location \"%s\"" % cfg['cache_base'])
2847+
action("Cache location \"%s\"" % cfg['cache_dir'])
28482848
else:
2849+
print cmd
28492850
error("Invalid cache command. Please see \"mbed cache --help\" for valid commands.")
28502851

28512852

0 commit comments

Comments
 (0)