Skip to content

Commit

Permalink
Print warning to stdout
Browse files Browse the repository at this point in the history
This enables the use of `pcluster dcv-connect -n <cluster> | pbcopy` to copy the url directly into macOS paste buffer.
  • Loading branch information
stephenmsachs authored May 2, 2024
1 parent 4ce1d84 commit d224619
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/src/pcluster/cli/commands/dcv_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ def _dcv_connect(args):

try:
url = _retry(_retrieve_dcv_session_url, func_args=[cmd, args.cluster_name, head_node_ip], attempts=4)
url_message = f"Please use the following one-time URL in your browser within 30 seconds:\n{url}"
url_message = f"Please use the following one-time URL in your browser within 30 seconds:"

if args.show_url:
print(url_message)
print(url_message, file=sys.stderr)
print(f"{url}")
return

try:
Expand Down

0 comments on commit d224619

Please sign in to comment.