Hi there -- much thanks for Joker... this is a pretty cool tool for both linting and scripting.
I have a use-case where I want to pass off the stdin tty to a sub process -- e.g. effectively call "exec" and never return to my process. Is there a way of doing this, or perhaps an easy path where I could add it?
Would implementing os/exec
be the right path forward?
Ok great -- much thanks. If there's some way I can help let me know. I did find a way around this issue (outside of joker) but this use case would still be helpful to me in the future.
https://github.com/candid82/joker/commit/89942e9b207cf14691f111992952e0a73b8798f6
Very awesome -- much thanks!
well, joker.os/sh
is already implemented using os/exec
facilities, it just doesn't support passing stdin
. I'll look into it. I am thinking it should be a more generic version of joker.os/sh
. Something like (joker.os/exec name opts)
, where opts
can have :dir
, :args
and :stdin
keys.
Hello folks! I am trying to send an http call but I get:
user=> (require '[joker.http :as http])
<joker.core>:3355:3: Eval error: open /home/arichiardi/joker/http.joke: no such file or directory
Stacktrace:
global <repl>:4:1
joker.core/require <joker.core>:3332:3
joker.core/apply <joker.core>:508:4
joker.core/apply__ <joker.core>:3252:9
joker.core/apply <joker.core>:508:4
joker.core/apply__ <joker.core>:3211:5
joker.core/with-bindings* <joker.core>:1381:7
joker.core/apply <joker.core>:506:4
joker.core/apply__ <joker.core>:3214:11
load <joker.core>:3170:3
joker.core/load <joker.core>:3367:9
joker.core/with-bindings* <joker.core>:1381:7
joker.core/apply <joker.core>:506:4
joker.core/apply__ <joker.core>:3371:13
joker.core/load-file <joker.core>:3355:3
Am I missing some configuration?I installed it with nix-env -i joker
ok it seems like working with the latest standalone executable
Looks like nix-env installs a fairly old version of Joker; if that doesn't have joker.http
, you'd likely see the same behavior. Try building Joker yourself as described on the main Joker github page.
Ah, yes.
cool thanks!
works like a charm! 😄
a question I have is, how do you folks distribute joker
scripts? say for running on CI, do you clone the whatever repo and just joker filename.joke
?
I hand-install joker
to /usr/bin
and have my *.joke
scripts start off with #!/usr/bin/env joker
, but that's just me cobbling together stuff for now.
yeah I was thinking about doing that as well...
ok sorry another lil' error I am getting
$ joker src/cd/assert_environment.cljs
<joker.core>:3474:13: Eval error: open /home/arichiardi/git/laputa/continuous-delivery/src/clojure/string.joke: no such file or directory
Stacktrace:
global src/cd/assert_environment.cljs:1:1
core/require <joker.core>:3423:3
core/apply <joker.core>:521:4
core/apply__ <joker.core>:3340:9
core/apply <joker.core>:521:4
core/apply__ <joker.core>:3293:5
core/with-bindings* <joker.core>:1400:7
core/apply <joker.core>:519:4
core/apply__ <joker.core>:3296:11
load <joker.core>:3236:3
core/load <joker.core>:3470:9
core/with-bindings* <joker.core>:1400:7
core/apply <joker.core>:519:4
core/apply__ <joker.core>:3474:13
this file contains (:require [clojure.string :as string])
and a couple of defs
probably I need to set the classpath or something?
There's no clojure.string
in Joker; just joker.string
. Joker still has a rather small library of packages in and of itself. There's an undocumented --classpath
(or -c
) option, I think it is, that we added recently, so it can search for other libraries instead of just assuming they're somewhere in the current working directory.
oh got it, so I would need to change my scripts ... cool thank you!