Skip to content

weird shell behavior in tasks, wildcard not read correctly? #1535

Answered by borkdude
sg-qwt asked this question in Q&A
Discussion options

You must be logged in to vote

@sg-qwt I converted your issue to a Q/A discussion over here, I think the Discussions part is more suited for this.

shell shells out to an external program, but it does not actually start a bash/zsh or whatever shell. As such it doesn't understand bash syntax.

You can accomplish the above with:

{:tasks
  {:requires ([babashka.fs :as fs])
   clean (fs/delete-tree ".github/workflows")

If you want wildcards etc to work, you have to invoke bash manually like this:

(shell "bash -c 'rm -rf .github/workflows/*'")

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@sg-qwt
Comment options

@borkdude
Comment options

@sg-qwt
Comment options

@borkdude
Comment options

Answer selected by sg-qwt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1534 on April 13, 2023 10:07.