Skip to content

Commit c287649

Browse files
committed
[cli] Make app name optional for "list-files"
If reading from a file/url the app name is not necessary.
1 parent dc68617 commit c287649

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

legendary/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ def list_files(self, args):
150150
if args.platform_override:
151151
args.force_download = True
152152

153+
if not args.override_manifest and not args.app_name:
154+
print('You must provide either a manifest url/path or app name!')
155+
return
156+
153157
# check if we even need to log in
154158
if args.override_manifest:
155159
logger.info(f'Loading manifest from "{args.override_manifest}"')
@@ -412,7 +416,7 @@ def main():
412416
install_parser.add_argument('app_name', help='Name of the app', metavar='<App Name>')
413417
uninstall_parser.add_argument('app_name', help='Name of the app', metavar='<App Name>')
414418
launch_parser.add_argument('app_name', help='Name of the app', metavar='<App Name>')
415-
list_files_parser.add_argument('app_name', help='Name of the app', metavar='<App Name>')
419+
list_files_parser.add_argument('app_name', nargs='?', help='Name of the app', metavar='<App Name>')
416420

417421
# importing only works on Windows right now
418422
if os.name == 'nt':

0 commit comments

Comments
 (0)