cli icon indicating copy to clipboard operation
cli copied to clipboard

Not working with crystal 0.30

Open renich opened this issue 6 years ago • 3 comments

The error is:

Error: abstract `def Enumerable(T)#each(&block)` must be implemented by Callback::ResultSet(T)

The code is one of your samples:

require "cli"
  
class Hello < Cli::Command
  class Options
    bool "--bye"
    arg "to"
  end

  def run
    if args.bye?
      print "Goodbye"
    else
      print "Hello"
    end
    puts " #{args.to}!"
  end
end

Hello.run %w(world) # prints "Hello, world!"
Hello.run %w(--bye world) # prints "Goodbye, world!"

renich avatar Aug 07 '19 02:08 renich

@renich, use bcardiff's fork until his pull request gets merged.

Add this to your shard.yml:

dependencies:
  cli:
    # github: mosop/cli
    github: bcardiff/cli
    branch: bcardiff/use-fork

nin93 avatar Aug 18 '19 20:08 nin93

@mosop Any chance to merge bcardiff's branch? :)

m-o-e avatar Jan 11 '20 15:01 m-o-e

I'm using

dependencies:
  cli:
    github: bcardiff/cli
    branch: crystal/0.35.1

jjlorenzo avatar Jul 01 '20 04:07 jjlorenzo