Restart terminal without ending job

In our setup, we’re installing Transifex in the .gitlab-ci.yml’s before_script block using the following line: curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash.

The problem is that according to Transifex’s documentation, it’s needed to restart the terminal to be able to access their command tx.

This used to work perfectly in the Intel MacOS managed runner, because we called source ~/.zshrc after the installation command. Now this returns an error: /opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc: line 1: autoload: command not found .

Is there any other way to do this? Or any idea what may be causing this error?

The terminal restart was most likely just to load updated PATH variable, which you can do yourself.
Find the absolute path to the directory where tx binary is or install it manually and see whats the value in PATH by running echo $PATH. And after Transifex is installed just run

export PATH=${PATH}:/path/to/tx/dir