Marek Kubica <ma...@xivilization.net> writes: > My project is currently quite simple. The program needs a single > argument, filename, to read from. So I added a :main entry into > project.clj and started > > $ lein run > > this took some time and crashed with an exception, because I did not > specify a file. Well, that was to be expected. So I thought I just add > an argument: > > $ lein run filename > > Instead of the output, I got this stacktrace: > > Exception in thread "main" java.lang.Exception: Unable to resolve > symbol: filename in this context (NO_SOURCE_FILE:1)
I think this is a bug. I've sent Phil a pull request with a proposed fix: http://github.com/ato/leiningen/commit/3f299cc560dbf7101c44a08d98da4177d6f326cc In the meantime you should be able to work around it by using: $ lein run -m your.namespace filename Or alternatively quoting the first argument like this: $ lein run '"filename"' -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en