0

Yesterday I have changed my .profile to include go path. And it looks like this:

if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi

GOPATH="$HOME/go"
PATH="$PATH:$GOPATH/bin"

When I run my laptop the next time, it is showing me a dialog that says there is an error in line 1.

What is wrong with my .profile file?

2
  • Welcome to AskUbuntu! You probably do not include line 1, containing # ~/.profile: executed by the command interpreter for login shells. Commented Oct 12, 2021 at 4:50
  • @pasmanpasmański, I have added that and it is not giving an error. Thanks a lot :).
    – Javlon
    Commented Oct 12, 2021 at 6:50

0

You must log in to answer this question.

Browse other questions tagged .