malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.23k stars 30 forks source link

YMKDIR does not raise ErrorLevel if directory creation failed #82

Closed aleaksunder closed 3 years ago

aleaksunder commented 3 years ago

Basically this in CMD will not ECHO:

"%yori_path%\ymkdir.exe" "A:\not\existen\drive\path"
IF ERRORLEVEL 1 (
    ECHO ERROR!!!
)
aleaksunder commented 3 years ago

By the way RMDIR does not raise ERRORLEVEL too if it fails to delete existen directory

aleaksunder commented 3 years ago

Thanks for the support! Tested a bit and it all works fine but I am not still pretty sure what MKDIR must return if a user tries to create a directory which is already exist... as for me than this is an error and ERRORLEVEL must be raised in this case