Skip to content

Commit

Permalink
Merge pull request #1359 from dmach/checkout-dont-print-open-requests
Browse files Browse the repository at this point in the history
Change 'checkout' command to print open requests only when running in an interactive terminal
  • Loading branch information
dirkmueller authored Jul 20, 2023
2 parents b8f6f07 + 3e08681 commit 1284867
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5267,7 +5267,8 @@ def do_checkout(self, subcmd, opts, *args):
server_service_files=opts.server_side_source_service_files,
progress_obj=self.download_progress, size_limit=opts.limit_size,
meta=opts.meta, outdir=opts.output_dir)
print_request_list(apiurl, project, package)
if os.isatty(sys.stdout.fileno()):
print_request_list(apiurl, project, package)

elif project:
sep = '/' if not opts.output_dir and conf.config['checkout_no_colon'] else conf.config['project_separator']
Expand Down Expand Up @@ -5328,7 +5329,8 @@ def do_checkout(self, subcmd, opts, *args):
server_service_files=opts.server_side_source_service_files,
progress_obj=self.download_progress, size_limit=opts.limit_size,
meta=opts.meta)
print_request_list(apiurl, project)
if os.isatty(sys.stdout.fileno()):
print_request_list(apiurl, project)

else:
self.argparse_error("Incorrect number of arguments.")
Expand Down

0 comments on commit 1284867

Please sign in to comment.