diff --git a/metaflow/plugins/pypi/micromamba.py b/metaflow/plugins/pypi/micromamba.py index a983787aa89..378d3d5993a 100644 --- a/metaflow/plugins/pypi/micromamba.py +++ b/metaflow/plugins/pypi/micromamba.py @@ -270,15 +270,22 @@ def _call(self, args, env=None): except ValueError: vpkg_version = None raise MicromambaException( - "Please set the environment variable CONDA_OVERRIDE_{var} to a specific version{version} of {name}.\n" - "Here is an example of supplying environment variables through the command line -\n\n" + "{msg}\n\n" + "*Please set the environment variable CONDA_OVERRIDE_{var} to a specific version{version} of {name}.*\n\n" + "Here is an example of supplying environment variables through the command line\n" "CONDA_OVERRIDE_{var}=<{name}-version> python flow.py ".format( + msg=msg.format( + cmd=" ".join(e.cmd), + code=e.returncode, + output=e.output.decode(), + stderr=error, + ), var=vpkg_name.upper(), version=( - "" if not vpkg_version else (" (%s)" % vpkg_version) + "" if not vpkg_version else f" ({vpkg_version})" ), name=vpkg_name, - ), + ) ) err.append(error) raise MicromambaException(