Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit ec6bd58

Browse files
author
totokaka
committed
Added confirmation to import
1 parent fc71466 commit ec6bd58

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

mcman/commands/import_cmd.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,15 @@ def run(self):
6363
self.parse_plugins(plugins, remote_plugins)
6464
self.parse_servers(servers, remote_servers)
6565

66-
self.p_main('Downloading servers and plugins'
67-
+ ' to {}'.format(self.args.destination)
68-
if self.args.destination != './' else '')
66+
self.p_main('Files to download:')
67+
self.p_blank()
68+
self.p_sub(common.list_names([i[0] for i in self.to_download]))
69+
self.p_blank()
70+
71+
if not common.ask('Do you want to continue?',
72+
skip=self.args.no_confirm):
73+
return
74+
6975
prefix = '({{part:>{}}}/{}) '.format(
7076
len(str(len(self.to_download))), len(self.to_download))
7177
for i in range(len(self.to_download)):
@@ -83,7 +89,6 @@ def run(self):
8389
os.remove(destination)
8490
print('Success')
8591

86-
8792
def parse_plugins(self, plugins, remote_plugins):
8893
""" Populate the to_download list with plugins to download. """
8994
for plugin in plugins:

0 commit comments

Comments
 (0)