Skip to content

Commit 68cd70b

Browse files
authored
Export a dummy vcpkg root to make binary happy
1 parent 6f8761c commit 68cd70b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vcpkg_precommit/hook.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import os
23
import platform
34
import subprocess
45
from pathlib import Path
@@ -39,6 +40,7 @@ def get_vcpkg_binary() -> Path:
3940

4041
def format_manifest_vcpkg_json(filename: str, vcpkg_binary: Path) -> bool:
4142
"""Format a single vcpkg.json file."""
43+
os.environ["VCPKG_ROOT"] = "/__dummy_vcpkg_root"
4244
result = subprocess.run(
4345
[str(vcpkg_binary), "format-manifest", "--x-wait-for-lock", filename],
4446
capture_output=True,

0 commit comments

Comments
 (0)