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

Can't run Ammonite scripts via relative paths anymore #353

lihaoyi opened this Issue Feb 26, 2016 · 0 comments


None yet
1 participant
Copy link

lihaoyi commented Feb 26, 2016

haoyi-mbp:blog haoyi$ ~/amm ./build.scala -- --publish true
Error: Argument <file-args>... failed when given './build.scala'. requirement failed: ./build.scala is not an absolute path
ammonite 0.5.5
Usage: ammonite [options] [<file-args>...] [<args>...]

  -p <value> | --predef <value>
        Any commands you want to execute at the start of the REPL session
  -f <value> | --predef-file <value>
        Lets you load your predef from a custom location
  -c <value> | --code <value>
        Pass in code to be run immediately in the REPL
  -h <file> | --home <file>
        The home directory of the REPL; where it looks for config and caches
        The Ammonite script file you want to execute
        Any arguments you want to pass to the Ammonite script file

Passing in the full path of build.scala works.

Seems like a regression in 0.5.5 when I changed the way paths were created from strings. In general, you should be able to run the scripts using their relative name, and any paths that the scripts take should also be automatically relativized

@lihaoyi lihaoyi added the bug label Feb 27, 2016

@lihaoyi lihaoyi closed this in 937f6b5 Feb 28, 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.