Fork me on GitHub
#babashka
<
2022-05-17
>
pinkfrog07:05:01

Is this a bug for the tokenize function?

(def cmd "[\"test\"]")
  
  (babashka.process/tokenize cmd)
The above gives
[ "[test"     "]" ]
instead of
[  "[\"test\"]"  ]

borkdude08:05:49

Seems like a bug. Wanna file an issue?

borkdude09:05:39

@UGC0NEP4Y Already pushed a fix to master

pinkfrog09:05:41

Great. Meant to open the issue hours later.

viesti08:05:59

Hmm, could I chdir to a directory before making a zip, so that the zip entries would be relative to that directory, instead the one where I run a babashka script?

viesti08:05:21

something like tar -C

borkdude08:05:36

you mean with fs/zip ?

viesti08:05:16

or could be some other way to do the same too

borkdude08:05:28

I think we should make an option for this perhaps

borkdude08:05:45

Wanna make an issue + PR?

viesti08:05:52

I knew that was coming 😄

viesti08:05:22

but yeah, let's see, not promising anything yet 🙂

borkdude08:05:30

For now you could also cheat by doing:

(shell {:dir "subdir"} "bb -e '(fs/zip ...)'")

borkdude08:05:55

chdir isn't supported in bb :(

viesti08:05:20

yeah, remembering that chdir in java not generally supported

jeff.terrell14:05:45

Am I understanding correctly that bb uberjar only intends to create an uberjar for execution by bb itself? Is there an easy way to create an uberjar that can run with java -jar?

jeff.terrell14:05:25

(I have a colleague with a Windows machine that is having difficulty installing Babashka, so I figured an uberjar would be an easy way for me to ship my code to him so that he could run it without Babashka.)

borkdude14:05:19

Please tell us about the difficulty on Windows. Babashka should be easy to install everywhere. Has he tried scoop?

borkdude14:05:38

Alternatively you can download the babashka uberjar and run your code using that as well

jeff.terrell14:05:50

He got some error I didn't understand when he tried to add the clojure bucket to scoop.

jeff.terrell14:05:01

Ah OK, that could work, thanks.

borkdude14:05:26

You can also just grab the bb.exe binary from here: https://github.com/babashka/babashka/releases/tag/v0.8.2

borkdude14:05:36

and just run it. Nothing more is necessary than that.

jeff.terrell14:05:52

Fantastic. Will try that! Apologies if I didn't read the installation instructions thoroughly enough to notice that.

borkdude14:05:00

scoop is just handy for placing it in your path, that's basically it

borkdude14:05:53

I will clarify this in the instructions. Your colleague is welcome to report his problem in #scoop

👍 1
🙏 1