Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu committed Dec 8, 2024
1 parent 1fa4622 commit 95d2088
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions myst_libre/tools/myst_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ def run_command(self, *args, env_vars={}, user=None, group=None):
print(f"Error running command: {e}")
print(f"Command output: {e.output}")
print(f"Error output: {e.stderr}")
return None, e.stderr
return "Error", e.stderr
except Exception as e:
print(f"Unexpected error: {e}")
return None, str(e)
return "Error", str(e)

def build(self, *args, user=None, group=None):
"""
Expand All @@ -157,14 +157,12 @@ def build(self, *args, user=None, group=None):
str: Command output or None if failed.
"""
os.chdir(self.build_dir)
self.cprint(f"--> Self env vars {self.env_vars}", "green")
#self.cprint(f"--> Self env vars {self.env_vars}", "green")
stdout_log, stderr_log = self.run_command(*args, env_vars=self.env_vars, user=user, group=group)
self.cprint(f"🐞 Command output: {stdout_log}", "light_grey")
#self.cprint(f"🐞 Command output: {stdout_log}", "light_grey")
if stderr_log is not None:
combined_log = stdout_log + stderr_log
else:
combined_log = stderr_log
return combined_log
stdout_log += stderr_log
return stdout_log

def convert(self, input_file, output_file, user=None, group=None):
"""
Expand Down

0 comments on commit 95d2088

Please sign in to comment.