retrogradeorbit / bootleg

Simple template processing command line tool to help build static websites
Eclipse Public License 2.0
254 stars 12 forks source link

Write file output option error #40

Closed prestancedesign closed 4 years ago

prestancedesign commented 4 years ago

Hi,

When I use --output option, the output file is created but is empty and I have this error:

$ bootleg -o test.html simple.clj
Exception in thread "main" java.lang.IllegalArgumentException: No matching method write found taking 1 args for class java.io.BufferedWriter
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:127)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:102)
    at bootleg.core$output_result.invokeStatic(core.clj:46)
    at bootleg.core$output_result.invoke(core.clj:39)
    at bootleg.core$_main.invokeStatic(core.clj:72)
    at bootleg.core$_main.doInvoke(core.clj:52)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at bootleg.core.main(Unknown Source)

Best regards.

retrogradeorbit commented 4 years ago

Is a native-image reflection issue. Use bootleg simple.clj > test.html as a workaround.

Am building a new release now.

retrogradeorbit commented 4 years ago

I have built a hotfix release available here for you:

https://github.com/retrogradeorbit/bootleg/releases/tag/v0.1.6-1

Being an issue with the native-image it's not picked up by the tests and I am using the tool myself with piped output. I will start using -o to make sure it keeps working. So thanks heaps for reporting this. It helps make it a better tool.