Skip to content

Commit 0fbe400

Browse files
authored
Allow empty ctf init values (#84)
* Allow empty string in CTFd URL and CTFd access token values for `ctf init` * Closes #81
1 parent d03381c commit 0fbe400

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ctfcli/__main__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@
1717

1818

1919
class CTFCLI(object):
20-
def init(self):
21-
ctf_url = click.prompt("Please enter CTFd instance URL")
22-
ctf_token = click.prompt("Please enter CTFd Admin Access Token")
20+
def init(self, no_config=False):
21+
ctf_url = click.prompt(
22+
"Please enter CTFd instance URL", default="", show_default=False
23+
)
24+
ctf_token = click.prompt(
25+
"Please enter CTFd Admin Access Token", default="", show_default=False
26+
)
2327
if (
2428
click.confirm(f"Do you want to continue with {ctf_url} and {ctf_token}")
2529
is False

0 commit comments

Comments
 (0)