Skip to content

ls'ing empty directory gives exception #312

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

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

ls'ing empty directory gives exception #312

averagehat opened this issue Dec 23, 2015 · 3 comments
Labels

Comments

@averagehat
Copy link

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
Copy link
Member

lihaoyi commented Dec 23, 2015

Oops, clearly a bug!

@cosmo-kramer
Copy link
Contributor

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

@lihaoyi
Copy link
Member

lihaoyi commented Jan 24, 2016

Yes, fixed by #326. Thanks @CoderAbhishek!

@lihaoyi lihaoyi closed this as completed Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants