Was merging main with my other PR and noticed the edited statement. I think as is it would fail to capture an error from conda create. Given that $? looks at the return code of the previous statement, it would be testing the success of echo "output" as opposed to the success of the environment creation. I changed it to not capture the output and instead just print it straight to the terminal, but we could also keep the capture+echo lines as is and instead add a line like result=$? in the middle.
Was merging main with my other PR and noticed the edited statement. I think as is it would fail to capture an error from
conda create
. Given that$?
looks at the return code of the previous statement, it would be testing the success ofecho "output"
as opposed to the success of the environment creation. I changed it to not capture the output and instead just print it straight to the terminal, but we could also keep the capture+echo lines as is and instead add a line likeresult=$?
in the middle.