-
Notifications
You must be signed in to change notification settings - Fork 81
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
Programmatic filtering #216
Comments
Would we attempt to parse the test block there, or allow it to run in the shell? Any idea how we could read the return code of that with passing it in as a string 🤔? |
I've written a shell script to solve my need here: index=0
split=-1
for arg in "$@"
do
if [ "$arg" = '--' ]; then
split=$index
break
fi
index=$(expr $index + 1)
done
if [ $split -eq -1 ]; then
echo "Invalid usage, expected: run-if condition -- command"
exit 1
fi
cond=${@:0:$(expr $split + 1)}
cmd=${@:$(expr $split + 2)}
if eval $cond; then
exec $cmd
fi Which you can then run as: bolt ws exec -- run-if [ -f tsconfig.json ] -- tsc Maybe bolt could have something like this built in |
Never mind, the above script shits itself in different places |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Idea:
bolt ws --when [ -f ./tsconfig.json ] -- tsc
The text was updated successfully, but these errors were encountered: