New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow command line parameters to specified anywhere in the command #17

Closed
LHCGreg opened this Issue Mar 15, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@LHCGreg
Copy link

LHCGreg commented Mar 15, 2014

It is confusing that command line parameters have to specifed in an exact location in the command. In

aptly publish snapshot name

if you want to specify the distribution name, you have to do

aptly publish snapshot -distribution="wheezy" name

You can't do

aptly publish snapshot name -distribution="wheezy"

or

aptly -distribution="wheezy" publish snapshot name

I recently went through this:

lhcgreg@debian-70rc1-x64-vbox4210-nocm:~/.aptly$ aptly publish snapshot pgdbsc
ERROR: unable to guess distribution name, please specify explicitly

lhcgreg@debian-70rc1-x64-vbox4210-nocm:~/.aptly$ aptly publish snapshot pgdbsc -distribution="wheezy"
ERROR: unable to guess distribution name, please specify explicitly

lhcgreg@debian-70rc1-x64-vbox4210-nocm:~/.aptly$ aptly -distribution="wheezy" publish snapshot pgdbsc
flag provided but not defined: -distribution

lhcgreg@debian-70rc1-x64-vbox4210-nocm:~/.aptly$ aptly publish -distribution="wheezy" snapshot pgdbsc
aptly publish - manage published repositories

Commands:

drop        remove published repository
list        list of published repositories
snapshot    publish snapshot

Use "publish help " for more information about a command.

Finally, I got it right.

lhcgreg@debian-70rc1-x64-vbox4210-nocm:~/.aptly$ aptly publish snapshot -distribution="wheezy" pgdbsc

@adamgibbins

This comment has been minimized.

Copy link

adamgibbins commented Mar 15, 2014

Absolutely, I also found this very confusing. At minimum the help should demonstrate where the arguments should be placed. e.g.
Usage: aptly publish snapshot [--distribution] name

@smira smira added the bug label Mar 16, 2014

@smira smira added this to the v0.5 milestone Mar 16, 2014

@smira

This comment has been minimized.

Copy link
Member

smira commented Mar 16, 2014

That's limitation of github.com/gonuts/commander package. I was thinking about fixing it there, so that parameters could be places anywhere.

@smira

This comment has been minimized.

Copy link
Member

smira commented Apr 2, 2014

In master flags could be mixed in the command line.

@smira smira closed this Apr 2, 2014

sliverc pushed a commit to sliverc/aptly that referenced this issue Jan 18, 2017

Merge pull request aptly-dev#17 from sliverc/mirror_update_memory
Do not write bytes to output which are only meant for progress bar on cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment