wavetermdev / waveterm

An open-source, cross-platform terminal for seamless workflows
https://www.waveterm.dev
Apache License 2.0
3.25k stars 73 forks source link

Broken terminal (ERRCWD invalid cwd) #668

Open rgonzlz opened 1 month ago

rgonzlz commented 1 month ago

Describe the bug

Hi!

I have installed Zim and when making ‘source .zshrc’ I get an error. error: ERRCWD invalid cwd '/Users/xxxx/.mshell/rcfiles/41e154ee-a44f-4404-ae0d-92ccbaccd70a' for command: stat /Users/xxxx/.mshell/rcfiles/41e154ee-a44f-4404-ae0d-92ccbaccd70a: no such file or directory

I navigated to the folder that says the environment variable $ZDOTDIR and Wave crashes everything, I can't write anything. With another terminal not crashed.

To Reproduce Steps to reproduce the behavior:

  1. Use this code from Zim:
# ------------------
# Initialize modules
# ------------------

ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
# Download zimfw plugin manager if missing.
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
  if (( ${+commands[curl]} )); then
    curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
        https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
  else
    mkdir -p ${ZIM_HOME} && wget -nv -O ${ZIM_HOME}/zimfw.zsh \
        https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
  fi
fi
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
  source ${ZIM_HOME}/zimfw.zsh init -q
fi
# Initialize modules.
source ${ZIM_HOME}/init.zsh
  1. Reload the config with source .zshrc
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Pasted Graphic

Using another Terminal

image

Pasted Graphic 2

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

rgonzlz commented 4 weeks ago

Hi! It's happening again

image

Is it possible that if you are inside the folder and it is deleted, everything is broken?