Activating conda environment in bash notebook produces error code?

When I try to activate a conda environment from within a JupyterLab Notebook running a bash kernel, it seems to activate successfully, but I keep getting what I think is an error code 1:

Any command I try running thereafter (such as pwd) also produces the error code.

When I try setting the kernel to a specific conda environment (using nb_conda_kernels), it does not seem to create a notebook in that environment, i.e. programs installed in that environment do not seem to be available, and it does not seem that the environment is actually activated at all.

So, how can I activate a conda environment from within a Notebook in JupyterLab without getting the above error?

The same happens when I use the pre-release Notebook v7, but NOT when I use Notebook v6.