Skip to content

Commit

Permalink
add check for config dir
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSDavidSoft committed Nov 6, 2022
1 parent 47caafb commit fbe3e17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Cmder.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ SET CMDER_ROOT=%~dp0
@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%

if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" (
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml"
if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul
if %errorlevel% neq 0 (
echo ERROR: CMDER Initialization has Failed
exit /b 1
)
)

if exist "%~1" (
Expand Down

0 comments on commit fbe3e17

Please sign in to comment.