Skip to content

Commit

Permalink
fix(parameter): prints message when there is nothing to upload
Browse files Browse the repository at this point in the history
When the user run rio parameter upload and there's no tree found to
upload, the command will not print an appropriate message informing the
user that there'sn nothing to upload.

Wrike Tickets:
1. https://www.wrike.com/open.htm?id=1182851006
2. https://www.wrike.com/open.htm?id=1182849811
  • Loading branch information
pallabpain committed Jan 23, 2024
1 parent 9a65dd3 commit 3aa3ea5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions riocli/parameter/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def upload_configurations(
click.secho('{} {}'.format(Symbols.ERROR, e), fg=Colors.RED)
raise SystemExit(1)

if not trees:
click.secho('{} No configuration trees to upload.'.format(Symbols.INFO), fg=Colors.BRIGHT_CYAN)
return

click.secho('Following configuration trees will be uploaded')
click.secho()
display_trees(path, trees)
Expand Down
2 changes: 1 addition & 1 deletion riocli/parameter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def filter_trees(
trees.append(each)

if tree_names and not trees:
raise Exception('specified tree names are invalid')
raise Exception('one or more specified tree names are invalid')

return trees

Expand Down

0 comments on commit 3aa3ea5

Please sign in to comment.