Fix ref_dir UnboundLocalError in self-hosting bootstrapper page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -233,13 +233,13 @@ def _bootstrapper_data(target: str) -> dict:
|
||||
if target not in ("javascript", "python", "self-hosting"):
|
||||
return {"bootstrapper-not-found": True}
|
||||
|
||||
if target == "self-hosting":
|
||||
return _self_hosting_data(ref_dir)
|
||||
|
||||
ref_dir = os.path.join(os.path.dirname(__file__), "..", "..", "shared", "sx", "ref")
|
||||
if not os.path.isdir(ref_dir):
|
||||
ref_dir = "/app/shared/sx/ref"
|
||||
|
||||
if target == "self-hosting":
|
||||
return _self_hosting_data(ref_dir)
|
||||
|
||||
if target == "javascript":
|
||||
# Read bootstrapper source
|
||||
bs_path = os.path.join(ref_dir, "bootstrap_js.py")
|
||||
|
||||
Reference in New Issue
Block a user