Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit ce1236e

Browse files
committed
Fix: warn when env vars are not set
1 parent a320c20 commit ce1236e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/dist2xml.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
if "COMPDIR" in os.environ:
88
data_path = os.path.join(os.environ["COMPDIR"], "runestone/dist")
99
else:
10-
data_path = ""
10+
print("Warning: No COMPDIR environment variable set using . for RunestoneComponents")
11+
data_path = "runestone/dist"
1112

1213
data = json.loads(
1314
open(os.path.join(data_path, "webpack_static_imports.json")).read())
1415

1516
if sys.argv[1] == "test":
1617
data['cdn-url'] = sys.argv[2] if len(sys.argv) > 2 else "_static/"
1718
else:
19+
print("Warning: You did not specify a URL for the cdn will use Runestone.Academy")
1820
data['cdn-url'] = "https://runestone.academy/cdn/runestone/"
1921

2022
data['version'] = sys.argv[1]

0 commit comments

Comments
 (0)