Skip to content

Commit 8248c5f

Browse files
committed
upd cli installer
1 parent ffee96d commit 8248c5f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/install.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def validate_digits_or_empty(value):
6363
return True
6464
try:
6565
int(value)
66+
if int(value) != -1 and int(value) <= 0:
67+
return "Input must be a positive number"
6668
return True
6769
except ValueError:
6870
return "Input must be a number"
@@ -121,6 +123,8 @@ def run_cli():
121123
get_archive_ttl_message(temp_answers),
122124
validate=validate_digits_or_empty
123125
).unsafe_ask()
126+
if not archive_ttl and 'archive-ttl-default' in temp_answers:
127+
archive_ttl = temp_answers['archive-ttl-default']
124128

125129
dump = None
126130
if not archive_blocks:
@@ -159,7 +163,7 @@ def run_install(answers: dict) -> list:
159163
mode = answers["mode"]
160164
network = answers["network"].lower()
161165
config = answers["config"]
162-
archive_ttl = answers["archive-ttl"] or answers.get("archive-ttl-default")
166+
archive_ttl = answers["archive-ttl"]
163167
add_shard = answers["add-shard"]
164168
validator_mode = answers["validator-mode"]
165169
archive_blocks = answers["archive-blocks"]

0 commit comments

Comments
 (0)