Skip to content
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

ls'ing empty directory gives exception #312

Closed
averagehat opened this Issue Dec 23, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@averagehat
Copy link

averagehat commented Dec 23, 2015

Welcome to the Ammonite Repl 0.5.2
(Scala 2.11.7 Java 1.8.0_60)
....
michael-foo@ %("ls", 'bar)
res5: Int = 0 

michael-foo@ ls! wd/'bar
java.lang.UnsupportedOperationException: empty.maxBy
        scala.collection.TraversableOnce$class.maxBy(TraversableOnce.scala:234)
        scala.collection.AbstractTraversable.maxBy(Traversable.scala:104)
        ammonite.repl.frontend.FrontEndUtils$.tabulate(FrontEndUtils.scala:17)
        ammonite.shell.PPrints$$anonfun$lsSeqRepr$1$$anonfun$apply$1.apply(ShellSession.scala:43)
        ammonite.shell.PPrints$$anonfun$lsSeqRepr$1$$anonfun$apply$1.apply(ShellSession.scala:43)
        scala.collection.Iterator$JoinIterator.rhs$lzycompute(Iterator.scala:192)
        scala.collection.Iterator$JoinIterator.rhs(Iterator.scala:192)
        scala.collection.Iterator$JoinIterator.hasNext(Iterator.scala:193)
        pprint.PPrinter$.strIter$1(PPrint.scala:241)
        pprint.PPrinter$.pprint$PPrinter$$takeFirstLines(PPrint.scala:258)
        pprint.PPrinter$$anon$4.render0(PPrint.scala:116)
        pprint.PPrinter$class.render(PPrint.scala:102)
        pprint.PPrinter$$anon$4.render(PPrint.scala:113)
        pprint.PPrint$$anon$3.render(PPrint.scala:62)
        ammonite.repl.frontend.DefaultReplAPI$Internal$.print(ReplAPI.scala:314)

@averagehat averagehat changed the title ls'ing empty directory give exception ls'ing empty directory gives exception Dec 23, 2015

@lihaoyi lihaoyi added the bug label Dec 23, 2015

@lihaoyi

This comment has been minimized.

Copy link
Owner

lihaoyi commented Dec 23, 2015

Oops, clearly a bug!

@cosmo-kramer

This comment has been minimized.

Copy link
Contributor

cosmo-kramer commented Jan 24, 2016

This bug is fixed,I think it should be closed.

@lihaoyi

This comment has been minimized.

Copy link
Owner

lihaoyi commented Jan 24, 2016

Yes, fixed by #326. Thanks @coderabhishek!

@lihaoyi lihaoyi closed this Jan 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.