Skip to content

Fails to parse option argument or throw a relevant error under specific condition #14

Description

@skvskv

Here's an example:

$ ./a.sh -v -L wfrge
Would get: 
    scp  -P22334 wfrge@81.1.210.123:/opt/scripts/db/.backup 
To: 
    /vagrant/db/.backup

$ ./a.sh -v 1 -L wfrge
SSH login is required option.

For help invoke with -? or --help 

The definitions of the options is as the following:

optparse.define short=L long=ssh-login desc="The login to use for sftp/scp connection" variable=ssh_login
optparse.define short=v long=verbose desc="" desc="Verbose mode." variable=verbose value=1 default=0

Works same way if long option name specified.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions