Skip to content

Commit e314e32

Browse files
committed
Fix registry configuration failure
1 parent 0acfd76 commit e314e32

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/manage/config.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ def load_registry_config(key_path, schema):
131131
"This is very unexpected. Please check your configuration " +
132132
"or report an issue at https://github.com/python/pymanager.",
133133
key_path)
134-
resolve_config(cfg, key_path, _global_file().parent, schema=schema, error_unknown=True)
134+
135+
try:
136+
from _native import package_get_root
137+
root = package_get_root()
138+
except ImportError:
139+
root = Path(sys.executable).parent
140+
resolve_config(cfg, key_path, root, schema=schema, error_unknown=True)
135141
return cfg
136142

137143

0 commit comments

Comments
 (0)