Skip to content

Commit

Permalink
Fix build on Linux
Browse files Browse the repository at this point in the history
quick build
  • Loading branch information
nvuillam committed Sep 21, 2022
1 parent e38ae72 commit 5543bc3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import subprocess
import sys
from datetime import date, datetime
from shutil import copyfile
from shutil import copyfile, which
from typing import Any
from urllib import parse as parse_urllib

Expand Down Expand Up @@ -2762,7 +2762,10 @@ def manage_output_variables():
def reformat_markdown_tables():
logging.info("Formatting markdown tables...")
# Call markdown-table-formatter with the list of files
format_md_tables_command = ["bash", "format-tables.sh"]
if sys.platform == "win32":
format_md_tables_command = ["bash", "format-tables.sh"]
else:
format_md_tables_command = ["./format-tables.sh"]
cwd = os.getcwd() + "/.automation"
logging.info("Running command: " + str(format_md_tables_command) + f" in cwd {cwd}")
process = subprocess.run(
Expand All @@ -2772,7 +2775,7 @@ def reformat_markdown_tables():
universal_newlines=True,
cwd=cwd,
shell=True,
executable=None if sys.platform == "win32" else "/bin/bash",
executable=None if sys.platform == "win32" else which("bash"),
)
stdout = utils.decode_utf8(process.stdout)
logging.info(f"Format table results: ({process.returncode})\n" + stdout)
Expand Down

0 comments on commit 5543bc3

Please sign in to comment.