@@ -17,13 +17,29 @@ echo {{ message }}
1717
1818{% macro install_env(env) % }
1919{{ tee(" Setting up " ~ env.name ~ " environment..." ) }}
20+ {{ tee(" DEBUG: env.prefix=" ~ env.prefix) }}
21+ {{ tee(" DEBUG: env.shortcuts=" ~ env.shortcuts) }}
2022set " CONDA_CHANNELS = {{ env.channels }}"
2123if " %OPTION_ENABLE_SHORTCUTS% " == " 1" (
2224 " %CONDA_EXE% " install --offline -yp " {{ env.prefix }}" --file " {{ env.lockfile }}" {{ env.shortcuts }} {{ no_rcs_arg }} --log-file " %LOG% "
2325) else (
2426 " %CONDA_EXE% " install --offline -yp " {{ env.prefix }}" --file " {{ env.lockfile }}" --no-shortcuts {{ no_rcs_arg }} --log-file " %LOG% "
2527)
26- if errorlevel 1 ( exit /b %errorlevel% )
28+ set " INSTALL_ERRORLEVEL = %errorlevel% "
29+ if %INSTALL_ERRORLEVEL% neq 0 ( exit /b %INSTALL_ERRORLEVEL% )
30+ rem Debug: Check Menu JSON files for $schema to determine new-style vs legacy
31+ if exist " {{ env.prefix }}\Menu\*.json" (
32+ for %%F in (" {{ env.prefix }}\Menu\*.json" ) do (
33+ findstr /C:" $schema" " %%F " > nul 2 >& 1
34+ if errorlevel 1 (
35+ echo DEBUG: %%~nxF uses LEGACY menuinst (no $schema) - checks .nonadmin
36+ >> " %LOG% " echo DEBUG: %%~nxF uses LEGACY menuinst (no $schema) - checks .nonadmin
37+ ) else (
38+ echo DEBUG: %% ~nxF uses NEW menuinst (has $schema) - elevate_as_needed decorator
39+ >> " %LOG% " echo DEBUG: %% ~nxF uses NEW menuinst (has $schema) - elevate_as_needed decorator
40+ )
41+ )
42+ )
2743{% endmacro % }
2844
2945rem Assign INSTDIR and normalize the path
@@ -111,10 +127,21 @@ if errorlevel 1 ( exit /b %errorlevel% )
111127
112128rem Create .nonadmin marker file for user-scoped installs inside BASE_PATH.
113129rem This is used by the uninstaller (and menuinst) to determine the install mode.
130+ echo DEBUG: ALLUSERS=%ALLUSERS%
131+ >> " %LOG% " echo DEBUG: ALLUSERS=%ALLUSERS%
114132if " %ALLUSERS% " == " 0" (
133+ echo DEBUG: Creating .nonadmin marker file
134+ >> " %LOG% " echo DEBUG: Creating .nonadmin marker file
115135 echo . > " %BASE_PATH% \.nonadmin"
116136 if errorlevel 1 ( exit /b %errorlevel% )
117137)
138+ if exist " %BASE_PATH% \.nonadmin" (
139+ echo DEBUG: .nonadmin file EXISTS at %BASE_PATH% \.nonadmin
140+ >> " %LOG% " echo DEBUG: .nonadmin file EXISTS at %BASE_PATH% \.nonadmin
141+ ) else (
142+ echo DEBUG: .nonadmin file DOES NOT EXIST
143+ >> " %LOG% " echo DEBUG: .nonadmin file DOES NOT EXIST
144+ )
118145
119146rem Install packages for each environment
120147{%- for env in setup_envs % }
0 commit comments