Describe the bug
Can no longer run tbash or tzsh from any directory. If you're not in the REMOTE_SRC or a child of it, you'll run into the following:
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: chdir to cwd ("/var/www/totara/src//home/cody/Projects") set in config.json failed: no such file or directory: unknown
To Reproduce
Steps to reproduce the behavior:
Open a terminal
CD into a non-Totara folder
Try running tzsh php-7.3
Expected behavior
Expected to connect to the PHP container via zsh, defaulting to the "/var/www/totara/src" folder
Additional context
Seems to be introduced in 52b5ae77d2c3706ec56b9799c6ce88991fd8f32e
if $PWD isn't a child of $LOCAL_SRC, you'll end up with a malformed path such as /var/www/totara/src//home/cody/Projects
There used to be a further check that caught it, but that's been removed:
if [ ! -f "$local_path/version.php" ]; then
remote_path="$REMOTE_SRC"
fi
Describe the bug Can no longer run tbash or tzsh from any directory. If you're not in the REMOTE_SRC or a child of it, you'll run into the following:
To Reproduce Steps to reproduce the behavior:
tzsh php-7.3
Expected behavior Expected to connect to the PHP container via zsh, defaulting to the "/var/www/totara/src" folder
Additional context Seems to be introduced in 52b5ae77d2c3706ec56b9799c6ce88991fd8f32e
if $PWD isn't a child of $LOCAL_SRC, you'll end up with a malformed path such as
/var/www/totara/src//home/cody/Projects
There used to be a further check that caught it, but that's been removed: