Details
-
Type:
Defect
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
For example, in the samples/hello-js directory, running the following works fine:
cljsc src '{:optimizations :advanced :output-to "hello-extern.js" :externs ["externs.js"]}'
However, the following fails:
cljsc src {:optimizations :advanced :externs ["./externs.js"]} > hello-extern.js
With the error message "Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: clojure.lang.Symbol".
Fully qualifying the path to externs.js seems to work, BUT it actually fails by placing an exception message into the hello-externs.js file.
I think your shell (bash?) may be treating the [...] portion of that expression as a character class and substituting matches from the file system. I'm not aware of any method for avoiding this other than changing shells to one that won't try to expand the [...].
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_04_03.html
Perhaps we should change the documentation examples so that they always quote the opts map. Maybe that would help avoid confusion.