Skip to content
Snippets Groups Projects
Commit 3c95c348 authored by Ronald Jäpel's avatar Ronald Jäpel
Browse files

Improve error reporting

parent 4716eab8
No related branches found
No related tags found
No related merge requests found
......@@ -403,9 +403,13 @@ class BaseRepo:
else:
dump_path = self.working_dir
print("Dumping conda environment.yml, this might take a moment.")
os.system(f"conda env export > {dump_path}/conda_environment.yml")
print("Dumping conda independent environment.yml, this might take a moment.")
os.system(f"conda env export --from-history > {dump_path}/conda_independent_environment.yml")
try:
os.system(f"conda env export > {dump_path}/conda_environment.yml")
print("Dumping conda independent environment.yml, this might take a moment.")
os.system(f"conda env export --from-history > {dump_path}/conda_independent_environment.yml")
except Exception as e:
print("Could not dump conda environment due to the following error:")
print(e)
print("Dumping pip requirements.txt.")
os.system(f"pip freeze > {dump_path}/pip_requirements.txt")
print("Dumping pip independent requirements.txt.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment