Skip to content

Commit fbe3e17

Browse files
committed
add check for config dir
1 parent 47caafb commit fbe3e17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Cmder.bat

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ SET CMDER_ROOT=%~dp0
55
@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%
66

77
if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" (
8-
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml"
8+
if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul
9+
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul
10+
if %errorlevel% neq 0 (
11+
echo ERROR: CMDER Initialization has Failed
12+
exit /b 1
13+
)
914
)
1015

1116
if exist "%~1" (

0 commit comments

Comments
 (0)