Open yihou opened 1 year ago
Hey @yihou, everything inside of FIG_DOTFILES_SOURCED
conditional are user-defined aliases and functions.
Open the dashboard and go to Dotfiles. You likely created an empty function block. Deleting that should resolve the issue.
Ahh thank you @mschrage, found the issue, it was due to a untitled function added in the Dotfiles
configurations without the intention of adding it.
For better UX, can we avoid adding empty function block if the user hasn't fill in the field?
I ran into this same problem, and deleting the empty function block indeed resolves the problem.
However, I agree with @yihou that fig should be smart about this and automatically avoid inserting empty functions into the script.
To help future googlers, this was my issue: bash: eval: line 41: syntax error near unexpected token `(' solved by deleting the empty function Was causing vscode in particular to timeout unable to resolve shell environment
Checks
fig doctor
in the affected terminal sessionfig restart
and replicated the issue againOperating system
macOS 13.5 (22G74)
Expected behaviour
Works fine in bash, and there's shouldn't have any errors thrown on shell start up.
Actual behaviour
Getting error below on starting Bash shell:
Running
fig doctor
Steps to reproduce
This error occurs when
bashrc.post.bash
has been added in.bashrc
.After going thru a bit of digging, I found out that
~/.local/bin/fig init bash post --rcfile bashrc
generate faulty bash scripts.The error occurs at the beginning, as shown below:
the anonymous function from the generated bash scripts causes the error.
Environment