ValueError when using a particular command
adamtheturtle opened this issue · 5 comments
adamtheturtle commented
I saw this error and I expect that bass
should not give a Python traceback.
~> bass 'cat <<EOF > mke-options.json
{
"service": {
"service_account": "kubernetes",
"service_account_secret": "kubernetes/sa"
}
}
EOF'
unknown error: need more than 1 value to unpack
Traceback (most recent call last):
File "/Users/adam/.config/fish/functions/__bass.py", line 90, in <module>
script = gen_script()
File "/Users/adam/.config/fish/functions/__bass.py", line 45, in gen_script
stdout, new_env, alias = output.split(divider, 2)
ValueError: need more than 1 value to unpack
Bass encountered an error!
adamtheturtle commented
Thank you for the software!
edc commented
Thanks for reporting. I pushed a fix. Please give it a try.
Also btw, you don't need to bass to run that command. You can just run it with bash -c
.
adamtheturtle commented
Thank you @edc - however I have tried bass
with the exact command from above after updating and I encountered the same error.
edc commented
You need to make sure there is no space before EOF for the here document to work properly.
$ bass 'cat <<EOF > mke-options.json
{
"service": {
"service_account": "kubernetes",
"service_account_secret": "kubernetes/sa"
}
}
EOF'
tbodt commented
The fix for this broke returning errors from bass.