Skip to content
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

Install on WSL - error line 2 of .bashrc syntax error near unexpected token `$'in\r'' #496

Open
MrTortoise opened this issue Nov 17, 2023 · 3 comments

Comments

@MrTortoise
Copy link

MrTortoise commented Nov 17, 2023

local reproduction steps:

cp /etc/skel/.bashrc ~/
source .bashrc
rm -rf ~/.oh-my-bash
bash -c "$(wget https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh -O -)"

output is

                        /____/                            .... is now installed!
Please look over the ~/.bashrc file to select a theme, plugins, completions, aliases, and options
To keep up on the latest news and updates, follow us on GitHub: https://github.com/ohmybash/oh-my-bash
bash: /home/john/.bashrc: line 2: syntax error near unexpected token `$'in\r''
'ash: /home/john/.bashrc: line 2: `case $- in

confused and googling hasn't helped.

Last time i did this all was fine.
So slightly confused.

thanks

@akinomyoga
Copy link
Contributor

What is the result of the following command?

$ type -a wget

@MrTortoise
Copy link
Author

MrTortoise commented Nov 28, 2023

wget is /usr/bin/wget
wget is /bin/wget

sorry for delay!
updated question to clarify more

@akinomyoga
Copy link
Contributor

I have again looked at the error message, and I think I now know what is happening. This must be the same issue as #253 and #327. You should set the following git configuration before installing OMB.

$ git config --global core.autocrlf false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants