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

:mode in upload doesnt accept chmod strings #127

Open
retrogradeorbit opened this issue Jul 13, 2021 · 0 comments
Open

:mode in upload doesnt accept chmod strings #127

retrogradeorbit opened this issue Jul 13, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@retrogradeorbit
Copy link
Member

retrogradeorbit commented Jul 13, 2021

Even though the documentation says it does.

     (upload {:content update-command
              :dest "/etc/cron.hourly/update-goaccess"
              :mode "a+x"})

gives:

Exception in thread "main" clojure.lang.ExceptionInfo: o != java.lang.String [at provisioning/goaccess.clj, line 17, column 1] {:type :sci/error, :line 17, :column 1, :message "o != java.lang.String [at provisioning/goaccess.clj, line 17, column 1]"}
	at sci.impl.utils$rethrow_with_location_of_node.invokeStatic(utils.cljc:72)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:573)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$eval_form.invokeStatic(interpreter.cljc:645)
	at sci.impl.interpreter$eval_string_STAR_.invokeStatic(interpreter.cljc:658)
	at sci.core$eval_string_STAR_.invokeStatic(core.cljc:189)
	at spire.eval$evaluate.invokeStatic(eval.clj:87)
	at spire.core$_main.invokeStatic(core.clj:80)
	at spire.core$_main.doInvoke(core.clj:57)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at spire.core.main(Unknown Source)
Caused by: java.util.IllegalFormatConversionException: o != java.lang.String
	at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4426)
	at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2938)
	at java.util.Formatter$FormatSpecifier.print(Formatter.java:2892)
	at java.util.Formatter.format(Formatter.java:2673)
	at java.util.Formatter.format(Formatter.java:2609)
	at java.lang.String.format(String.java:2897)
	at clojure.core$format.invokeStatic(core.clj:5746)
	at spire.scp$scp_copy_data.invokeStatic(scp.clj:116)
	at spire.scp$scp_content_to.invokeStatic(scp.clj:295)
	at spire.module.upload$upload_STAR_.invokeStatic(upload.clj:269)
	at spire.module.upload$upload_STAR_.doInvoke(upload.clj:100)
	at clojure.lang.RestFn.invoke(RestFn.java:457)
	at sci.impl.interpreter$fn_call.invokeStatic(interpreter.cljc:522)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:573)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_do_STAR_$fn__5649.invoke(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do_STAR_.invokeStatic(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:488)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:555)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_let$fn__5469.invoke(interpreter.cljc:76)
	at sci.impl.interpreter$eval_let.invokeStatic(interpreter.cljc:64)
	at sci.impl.interpreter$eval_let.doInvoke(interpreter.cljc:61)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:536)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_do_STAR_$fn__5649.invoke(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do_STAR_.invokeStatic(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:488)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:555)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_try.invokeStatic(interpreter.cljc:291)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_do_STAR_$fn__5649.invoke(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do_STAR_.invokeStatic(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:488)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:555)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_do_STAR_$fn__5649.invoke(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do_STAR_.invokeStatic(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:488)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:555)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_do_STAR_$fn__5649.invoke(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do_STAR_.invokeStatic(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:488)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:555)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_try.invokeStatic(interpreter.cljc:291)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_let.invokeStatic(interpreter.cljc:85)
	at sci.impl.interpreter$eval_let.doInvoke(interpreter.cljc:61)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:536)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_let.invokeStatic(interpreter.cljc:85)
	at sci.impl.interpreter$eval_let.doInvoke(interpreter.cljc:61)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:536)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_do_STAR_$fn__5649.invoke(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do_STAR_.invokeStatic(interpreter.cljc:479)
	at sci.impl.interpreter$eval_do.invokeStatic(interpreter.cljc:488)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:555)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_try.invokeStatic(interpreter.cljc:291)
	at sci.impl.interpreter$interpret.invokeStatic(interpreter.cljc:613)
	at sci.impl.interpreter$interpret.invoke(interpreter.cljc:590)
	at sci.impl.interpreter$eval_let.invokeStatic(interpreter.cljc:85)
	at sci.impl.interpreter$eval_let.doInvoke(interpreter.cljc:61)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at sci.impl.interpreter$eval_special_call.invokeStatic(interpreter.cljc:536)
	at sci.impl.interpreter$eval_call.invokeStatic(interpreter.cljc:564)
	... 9 more

the following works

     (upload {:content update-command
              :dest "/etc/cron.hourly/update-goaccess"
              :mode 0755})
@retrogradeorbit retrogradeorbit added the bug Something isn't working label Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant