Skip to content

Commit ce8a42a

Browse files
authored
Add prompt for enable_additional_checksum (#85)
1 parent 4c1306a commit ce8a42a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

cirro/cli/controller.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,12 @@ def run_configure_workflow():
171171

172172

173173
def run_configure():
174-
auth_method, auth_method_config = gather_auth_config()
174+
auth_method, auth_method_config, enable_additional_checksum = gather_auth_config()
175175
save_user_config(UserConfig(auth_method=auth_method,
176176
auth_method_config=auth_method_config,
177177
base_url=None,
178-
transfer_max_retries=None))
178+
transfer_max_retries=None,
179+
enable_additional_checksum=enable_additional_checksum))
179180

180181

181182
def _check_configure():

cirro/cli/interactive/auth_args.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
from typing import Tuple, Dict
22

3-
from cirro.cli.interactive.utils import ask_yes_no
3+
from cirro.cli.interactive.utils import ask_yes_no, ask
44

55

66
def gather_auth_config() -> Tuple[str, Dict]:
77
auth_method_config = {
88
'enable_cache': ask_yes_no("Would you like to save your login? (do not use this on shared devices)")
99
}
1010

11-
return 'ClientAuth', auth_method_config
11+
enable_additional_checksum = ask(
12+
"select",
13+
"Upload / download validation type (note: SHA-256 requires additional local compute)",
14+
choices=["MD5", "SHA-256"]
15+
) == "SHA-256"
16+
17+
return 'ClientAuth', auth_method_config, enable_additional_checksum

0 commit comments

Comments
 (0)