Skip to content

Commit 2332327

Browse files
committed
Updated defaults and added a TOKEN env var.
1 parent cf59294 commit 2332327

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

commands/upload.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ async def list_repos(*, session, org, token):
170170
prompt=click.style("Enter your personal access token", bold=True),
171171
help="Personal Access token with read and write access to org.",
172172
hide_input=True,
173+
envvar='TOKEN',
173174
)
174175
@click.option(
175176
"--source",
@@ -183,7 +184,10 @@ async def list_repos(*, session, org, token):
183184
help="Destination path.",
184185
)
185186
@click.option(
186-
"--overwrite/--no-overwrite", help="Overwrite existing files.", default=True
187+
"--overwrite/--no-overwrite",
188+
prompt=click.style("Should we overwrite existing contents at this path", fg="cyan"),
189+
help="Overwrite existing files.",
190+
default=False,
187191
)
188192
async def main(org, token, source, dest, overwrite):
189193
"""Upload a file to all repositories owned by an organization/user."""
@@ -237,10 +241,6 @@ async def main(org, token, source, dest, overwrite):
237241
return
238242

239243
for repo in repos:
240-
click.echo(
241-
"Uploading {path} to repository {repo}...".format(path=dest, repo=repo)
242-
)
243-
244244
task = asyncio.ensure_future(
245245
handle_file_upload(
246246
repo=repo,

0 commit comments

Comments
 (0)