Skip to content

Commit

Permalink
add logs to error message (Netflix#2079)
Browse files Browse the repository at this point in the history
  • Loading branch information
savingoyal authored Oct 5, 2024
1 parent 68ec72f commit 7a22db0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions metaflow/plugins/pypi/micromamba.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <args>".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(
Expand Down

0 comments on commit 7a22db0

Please sign in to comment.