Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.3.16-pre: 1.3.15 Fixes #2339

Merged
merged 19 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 1.3.16-pre

* fix vscode terminal errors when setting cmder fast_init=1 outside cmder [#2339](https://github.com/cmderdev/cmder/pull/2339)

## [1.3.15](https://github.com/cmderdev/cmder/tree/v1.3.15) (2020-06-26)

* Fixes #2247, fixes #2254 [#2265](https://github.com/cmderdev/cmder/pull/2265)
Expand Down
15 changes: 8 additions & 7 deletions vendor/init.bat
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ if "%CMDER_CLINK%" == "1" (
if not exist "%CMDER_USER_CONFIG%\settings" (
echo Generating clink initial settings in "%CMDER_USER_CONFIG%\settings"
copy "%CMDER_ROOT%\vendor\clink_settings.default" "%CMDER_USER_CONFIG%\settings"
B
echo Additional *.lua files in "%CMDER_USER_CONFIG%" are loaded on startup.\
)
"%CMDER_ROOT%\vendor\clink\clink_%clink_architecture%.exe" inject --quiet --profile "%CMDER_USER_CONFIG%" --scripts "%CMDER_ROOT%\vendor"
Expand Down Expand Up @@ -200,14 +201,14 @@ if defined GIT_INSTALL_ROOT (

:: check if git is in path...
for /F "delims=" %%F in ('where git.exe 2^>nul') do (
:: get the absolute path to the user provided git binary
%lib_git% is_git_shim "%%~dpF"
%lib_git% get_user_git_version
%lib_git% compare_git_versions
)
if not defined GIT_INSTALL_ROOT (
:: get the absolute path to the user provided git binary
%lib_git% is_git_shim "%%~dpF"
%lib_git% get_user_git_version
%lib_git% compare_git_versions

if defined GIT_INSTALL_ROOT (
goto :FOUND_GIT
goto :FOUND_GIT
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the script always go to FOUND_GIT which does not seem intended, e.g. %lib_git% compare_git_versions does not define GIT_INSTALL_ROOT when the checked git is older than the vendored git.

So this should probably be checked at the end of each iteration instead:

Suggested change
if not defined GIT_INSTALL_ROOT (
:: get the absolute path to the user provided git binary
%lib_git% is_git_shim "%%~dpF"
%lib_git% get_user_git_version
%lib_git% compare_git_versions
if defined GIT_INSTALL_ROOT (
goto :FOUND_GIT
goto :FOUND_GIT
)
:: get the absolute path to the user provided git binary
%lib_git% is_git_shim "%%~dpF"
%lib_git% get_user_git_version
%lib_git% compare_git_versions
if defined GIT_INSTALL_ROOT (
goto :FOUND_GIT
)

)

:: our last hope: our own git...
Expand Down
4 changes: 2 additions & 2 deletions vendor/lib/lib_console.cmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@echo off

if "%fast_init%" == "1" exit /b

call "%~dp0lib_base.cmd"
set lib_console=call "%~dp0lib_console.cmd"

if "%fast_init%" == "1" exit /b

if "%~1" == "/h" (
%lib_base% help "%~0"
) else if "%1" neq "" (
Expand Down