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

$file import fails for scripts in nested folders if you leave out the `.sc` when running script #417

lihaoyi opened this Issue Jul 28, 2016 · 1 comment


None yet
1 participant
Copy link

lihaoyi commented Jul 28, 2016

haoyi-mbp:~ haoyi$ amm A
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(
    at ammonite.util.Name.<init>(Model.scala:120)
    at ammonite.util.Util$.pathToPackageWrapper(Util.scala:23)
    at ammonite.main.Scripts$.runScript(Scripts.scala:20)
    at ammonite.Main.runScript(Main.scala:82)
    at ammonite.Main$$anonfun$main$1$$anonfun$apply$1.apply(Main.scala:193)
    at ammonite.Main$.ammonite$Main$$ifContinually$1(Main.scala:173)
    at ammonite.Main$$anonfun$main$1.apply(Main.scala:175)
    at ammonite.Main$$anonfun$main$1.apply(Main.scala:175)
    at scala.Option.foreach(Option.scala:257)
    at ammonite.Main$.main(Main.scala:175)
    at ammonite.Main.main(Main.scala)

A file A doesn't need to exist, nor does Nevertheless, we should fail with a better error message


This comment has been minimized.

Copy link

lihaoyi commented Aug 5, 2016

Fixed by #425

@lihaoyi lihaoyi closed this Aug 5, 2016

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