File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7266,7 +7266,15 @@ def switch_active_python(self, version: str) -> int:
72667266 safe_print (_ (" Run 'omnipkg list python' to see managed interpreters." ))
72677267 safe_print (f" If Python { version } is 'Discovered', first adopt it with: omnipkg python adopt { version } " )
72687268 return 1
7269- target_interpreter_str = str (target_interpreter_path )
7269+ if "venv-native" in str (target_interpreter_path ):
7270+ # If it is, IGNORE the symlink path and get the TRUE native path.
7271+ # This is the sacred path that must be preserved.
7272+ true_native_path = str (self .config_manager .venv_path / 'bin' / f'python{ version } ' )
7273+ target_interpreter_str = true_native_path
7274+ safe_print (f" - ✅ Detected swap to native interpreter. Using original path: { target_interpreter_str } " )
7275+ else :
7276+ # For all OTHER interpreters, the managed path is correct.
7277+ target_interpreter_str = str (target_interpreter_path )
72707278 safe_print (_ (' - Found managed interpreter at: {}' ).format (target_interpreter_str ))
72717279 new_paths = self .config_manager ._get_paths_for_interpreter (target_interpreter_str )
72727280 if not new_paths :
You can’t perform that action at this time.
0 commit comments