File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
camel/toolkits/terminal_toolkit Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -384,8 +384,11 @@ def setup_initial_env_with_venv(
384384 symlinks = True ,
385385 )
386386 except Exception :
387+ # Clean up partial environment
388+ if os .path .exists (env_path ):
389+ shutil .rmtree (env_path )
387390 # Fallback to symlinks=False if symlinks=True fails
388- # (e.g., on some Windows configurations)
391+ # (e.g., on some Windows configurations or macOS Beta )
389392 venv .create (
390393 env_path ,
391394 with_pip = True ,
@@ -555,6 +558,9 @@ def clone_current_environment(
555558 try :
556559 venv .create (env_path , with_pip = True , symlinks = True )
557560 except Exception :
561+ # Clean up partial environment
562+ if os .path .exists (env_path ):
563+ shutil .rmtree (env_path )
558564 # Fallback to symlinks=False if symlinks=True fails
559565 venv .create (env_path , with_pip = True , symlinks = False )
560566
You can’t perform that action at this time.
0 commit comments