Skip to content

Commit

Permalink
minimal comspec detection (fixes #2744)
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSDavidSoft authored Sep 9, 2022
1 parent 5c409da commit d1b1012
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions vendor/lib/lib_base.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,21 @@ exit /b
::: file <in> full path to file containing lib_routines to display
:::.
:::-------------------------------------------------------------------------------
echo %comspec% | %WINDIR%\System32\find /i "\cmd.exe" > nul && set "CMDER_SHELL=cmd"
echo %comspec% | %WINDIR%\System32\find /i "\tcc.exe" > nul && set "CMDER_SHELL=tcc"
echo %comspec% | %WINDIR%\System32\find /i "\tccle" > nul && set "CMDER_SHELL=tccle"

call :detect_comspec %ComSpec%
exit /b

:detect_comspec
CMDER_SHELL=%~n1
if not defined CMDER_CLINK (
set CMDER_CLINK=1
if "%CMDER_SHELL%" equ "tcc" set CMDER_CLINK=0
if "%CMDER_SHELL%" equ "tccle" set CMDER_CLINK=0
)

if not defined CMDER_ALIASES (
set CMDER_ALIASES=1
if "%CMDER_SHELL%" equ "tcc" set CMDER_ALIASES=0
if "%CMDER_SHELL%" equ "tccle" set CMDER_ALIASES=0
)

exit /b

:update_legacy_aliases
Expand Down

0 comments on commit d1b1012

Please sign in to comment.