Skip to content

Commit

Permalink
fix issue #308
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocky14683 committed Jun 4, 2024
1 parent b173977 commit 52adf19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pros/cli/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def upload_cli():
help='Compress the program binary before uploading.')
@click.option('--description', default="Made with PROS", type=str, cls=PROSOption, group='V5 Options',
help='Change the description displayed for the program.')
@click.option('--name', default=None, type=str, cls=PROSOption, group='V5 Options',
@click.option('--name', 'remote_name', default=None, type=str, cls=PROSOption, group='V5 Options',
help='Change the name of the program.')

@default_options
Expand Down Expand Up @@ -114,7 +114,7 @@ def upload(path: Optional[str], project: Optional[c.Project], port: str, **kwarg
if not port:
raise dont_send(click.UsageError('No port provided or located. Make sure to specify --target if needed.'))
if kwargs['target'] == 'v5':
kwargs['remote_name'] = kwargs['name'] if kwargs.get("name",None) else kwargs['remote_name']
kwargs['remote_name'] = kwargs['name'] if kwargs.get('name',None) else kwargs['remote_name']
if kwargs['remote_name'] is None:
kwargs['remote_name'] = os.path.splitext(os.path.basename(path))[0]
kwargs['remote_name'] = kwargs['remote_name'].replace('@', '_')
Expand Down

0 comments on commit 52adf19

Please sign in to comment.