Skip to content

boolean options changed in v0.20.0 #580

@toepokesoftware

Description

@toepokesoftware

I think I have found a possible bug in boolean options. The value of the option is different when a CLI argument is included.

        desc 'test1', 'This is test1 CLI'
        option :skip_upload, default: false, type: :boolean
        def test1
          puts "test1: skip=#{options[:skip_upload]}"
        end

        desc 'test2', 'This is the test2 CLI'
        option :skip_upload, default: false, type: :boolean
        def test2(param)
          puts "test2: skip=#{options[:skip_upload]}"
        end
$ bundle exec exe/astcli cdr test1
test1: skip=false
$ bundle exec exe/astcli cdr test2 argument
test2: skip=false

$ bundle exec exe/astcli cdr test1 --skip-upload
test1: skip=true
$ bundle exec exe/astcli cdr test2 --skip-upload argument
test2: skip=false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions