From 5e7a7029d138f6a1cefbeae6e3d98e9b58c3053e Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Sat, 4 Jul 2020 14:23:16 -0400 Subject: [PATCH] make vscode_init.cmd smart enough to apply cmder settings if launched from inside or outside cmder --- vendor/bin/vscode_init.cmd | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/vendor/bin/vscode_init.cmd b/vendor/bin/vscode_init.cmd index cc1161b..fc6b300 100644 --- a/vendor/bin/vscode_init.cmd +++ b/vendor/bin/vscode_init.cmd @@ -11,18 +11,15 @@ if not defined CMDER_ROOT ( if defined cmder_user_bin ( if exist "%cmder_user_bin%\vscode_init_args.cmd" ( set CMDER_VSCODE_INIT_ARGS=%cmder_user_bin%\vscode_init_args.cmd - ) else ( - echo Creating initial "%CMDER_ROOT%\bin\vscode_init_args.cmd"... - copy "%CMDER_ROOT%\bin\vscode_init_args.cmd.default" "%cmder_user_bin%\vscode_init_args.cmd" ) ) else if exist "%CMDER_ROOT%\bin\vscode_init_args.cmd" ( set CMDER_VSCODE_INIT_ARGS=%CMDER_ROOT%\bin\vscode_init_args.cmd -) else ( - echo Creating initial "%CMDER_ROOT%\bin\vscode_init_args.cmd"... - copy "%CMDER_ROOT%\bin\vscode_init_args.cmd.default" "%CMDER_ROOT%\bin\vscode_init_args.cmd" ) -if defined CMDER_VSCODE_INIT_ARGS ( +if not exist "%CMDER_VSCODE_INIT_ARGS%" ( + echo Creating initial "%CMDER_VSCODE_INIT_ARGS%"... + copy "%CMDER_ROOT%\vendor\bin\vscode_init_args.cmd.default" "%CMDER_VSCODE_INIT_ARGS%" +else ( call "%CMDER_VSCODE_INIT_ARGS%" )