Home > Enterprise >  Issue with .bashrc on starting gcloud beta interactive
Issue with .bashrc on starting gcloud beta interactive

Time:06-12

When I run gcloud beta interactive, the start up message produces this error:

Welcome to the gcloud interactive shell environment.

    Tips:

      ▪ start by typing commands to get auto-suggestions and inline help
      ▪ use tab, up-arrow, or down-arrow to navigate completion dropdowns
      ▪ use space or / to accept the highlighted dropdown item
      ▪ run gcloud <alpha|beta> interactive --help for more info

    Run $ gcloud feedback to report bugs or request new features.

/home/dylanrussell/.bashrc: line 4: $'\r': command not found
/home/dylanrussell/.bashrc: line 6: syntax error near unexpected token `$'in\r''
'home/dylanrussell/.bashrc: line 6: `case $- in

The relevant part of my .bashrc is:

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

I can't seem to figure out how to fix this error message. It seems gcloud continues to work for me regardless but I would still like to resolve this issue.

CodePudding user response:

Is it possible that you have conflict due to linux/windows new line characters? Please use any tool (there are hundreds of them) that shows you hex-code of your bashrc to see what you have at the end of line.

  • Related