@@ -267,27 +267,20 @@ def test_bootstrap_installs_anaconda_cli(
267267 assert tool_dir .exists (), f"Tool directory not found: { tool_dir } "
268268 assert tool_dir .is_dir ()
269269
270- def test_bootstrap_creates_symlinked_binary (
270+ def test_bootstrap_does_not_create_symlink (
271271 self , run_ana : AnaRunner , fake_home : Path
272272 ) -> None :
273- """Test that bootstrap creates a symlinked anaconda binary in ~/.ana/bin."""
273+ """Test that bootstrap does NOT create an anaconda symlink in ~/.ana/bin.
274+
275+ anaconda-cli is only accessible via ana subcommands to avoid shadowing
276+ the user's existing anaconda command from anaconda-auth.
277+ """
274278 result = run_ana ("bootstrap" )
275279 assert result .returncode == 0
276280
277- # Verify the symlinked binary exists
281+ # Verify NO symlink is created
278282 bin_path = fake_home / ".ana" / "bin" / ANACONDA_BIN
279- assert bin_path .exists (), f"Binary not found: { bin_path } "
280- tools_dir = fake_home / ".ana" / "tools"
281- if IS_WINDOWS :
282- shim_cfg = tools_dir / "shims.cfg"
283- assert (
284- "anaconda=anaconda-cli\\ Scripts\\ anaconda.exe\r \n "
285- in shim_cfg .read_text (newline = "" )
286- )
287- else :
288- src_file = tools_dir / "anaconda-cli" / "bin" / "anaconda"
289- assert bin_path .is_symlink (), f"Binary is not a symlink: { bin_path } "
290- assert bin_path .samefile (src_file )
283+ assert not bin_path .exists (), f"Symlink should not be created: { bin_path } "
291284
292285 def test_bootstrap_already_installed (
293286 self , run_ana : AnaRunner , fake_home : Path
@@ -297,9 +290,9 @@ def test_bootstrap_already_installed(
297290 first_result = run_ana ("bootstrap" )
298291 assert first_result .returncode == 0
299292
300- # Verify installation exists
301- bin_path = fake_home / ".ana" / "bin " / ANACONDA_BIN
302- assert bin_path .exists ()
293+ # Verify tool prefix exists
294+ tool_dir = fake_home / ".ana" / "tools " / "anaconda-cli"
295+ assert tool_dir .exists ()
303296
304297 # Second run should indicate already installed
305298 second_result = run_ana ("bootstrap" )
@@ -309,13 +302,25 @@ def test_bootstrap_already_installed(
309302 def test_bootstrap_anaconda_binary_runs (
310303 self , run_ana : AnaRunner , fake_home : Path
311304 ) -> None :
312- """Test that the installed anaconda binary runs and outputs help ."""
305+ """Test that the installed anaconda binary runs from the tool prefix ."""
313306 result = run_ana ("bootstrap" )
314307 assert result .returncode == 0
315308
316- # Run the installed anaconda binary
317- bin_path = fake_home / ".ana" / "bin" / ANACONDA_BIN
318- assert bin_path .exists ()
309+ # Run the anaconda binary directly from the tool prefix
310+ if IS_WINDOWS :
311+ bin_path = (
312+ fake_home
313+ / ".ana"
314+ / "tools"
315+ / "anaconda-cli"
316+ / "Scripts"
317+ / "anaconda.exe"
318+ )
319+ else :
320+ bin_path = (
321+ fake_home / ".ana" / "tools" / "anaconda-cli" / "bin" / "anaconda"
322+ )
323+ assert bin_path .exists (), f"Binary not found: { bin_path } "
319324
320325 proc = subprocess .run (
321326 [str (bin_path ), "--help" ],
0 commit comments