Skip to content

Commit

Permalink
Add WixToolset.Util.wixext
Browse files Browse the repository at this point in the history
  • Loading branch information
mario4tier committed Dec 20, 2024
1 parent ffb258b commit 613809d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/dev-nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
run: |
call "%VCVARSALL%" x64
dotnet tool install --global wix
wix extension add -g WixToolset.Util.wixext
%PYTHON% %GITHUB_WORKSPACE%\scripts\package.py
%PYTHON% %GITHUB_WORKSPACE%\scripts\test-dist.py
Expand Down
16 changes: 11 additions & 5 deletions scripts/utilities/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import filecmp
import glob
import os
import re
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -187,11 +188,16 @@ def run_command(command: list) -> str:
if result.returncode != 0:
print(f"stdout for '{' '.join(command)}': {result.stdout}")
print(f"stderr for '{' '.join(command)}': {result.stderr}")
log_file = "D:/a/ta-lib-temp/ta-lib-temp/build/_CPack_Packages/win64/WIX/wix.log"
if os.path.exists(log_file):
print(f"Contents of {log_file}:")
with open(log_file, 'r') as f:
print(f.read())
# If result.stderr contains the string "CPack Error: Problem running WiX.", then
# print the content of the log file at the specified path.
if "CPack Error: Problem running WiX." in result.stderr:
log_file_match = re.search(r"'([^']+)'", result.stderr)
if log_file_match:
log_file = log_file_match.group(1)
if os.path.exists(log_file):
print(f"Contents of {log_file}:")
with open(log_file, 'r') as f:
print(f.read())
sys.exit(1)
except subprocess.CalledProcessError as e:
print(f"Error during '{' '.join(command)}': {e}")
Expand Down

0 comments on commit 613809d

Please sign in to comment.