shell-init: error retrieving current directory: getcwd: cannot access parent directories
This error is caused when the directory you have navigated to inside the terminal does not exist anymore. Some commands are affected by this, others are not. sudo eopkg up
is affected by it.
e.g
mkdir ~/test
cd ~/test
rm -rf ~/test
sudo eopkg it vivaldi-stable
Following packages will be installed:
ffmpeg-chromium vivaldi-stable
Total size of package(s): 83.89 MB
There are extra packages due to dependencies. Do you want to continue? (yes/no)y
Downloading 1 / 2
Package ffmpeg-chromium found in repository Solus
ffmpeg-chromium-98.0.4758.102-14-1-x86_64.eopkg [cached]
Downloading 2 / 2
Package vivaldi-stable found in repository Solus
vivaldi-stable-5.1.2567.66-157-1-x86_64.eopkg [cached]
Installing 1 / 2
ffmpeg-chromium-98.0.4758.102-14-1-x86_64.eopkg [cached]
Installing ffmpeg-chromium, version 98.0.4758.102, release 14
Extracting the files of ffmpeg-chromium
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
[✓] Syncing filesystems success
System error. Program terminated.
[Errno 2] No such file or directory
Please use 'eopkg help' for general help.
Use --debug to see a traceback.
Solution
Switch to a directory that actually exists such as your home directory. Example:
cd ~/
That command will navigate to your home directory which should still exist, if it does not you have bigger problems. You can now run all commands without issue.