oc-bootstrapper
oc-bootstrapper copied to clipboard
`mv` and `rm` commands don't work under Windows
I get the above error when running 'october install' using Windows 10. The files are downloaded but the folder october-master isn't removed and the files that are supposed to be moved to the root directory stay inside it. The problem seems to be at the following lines of Downloader\OctoberCMS.php:
(new Process(sprintf('mv %s %s', $source . '/*', $directory)))->run();
(new Process(sprintf('rm -rf %s', $source)))->run();
I have tried running the command in Power shell and Cmd, with and without administrator privileges and 2 different computers.
EDIT: turns out the 'mv' and 'rm' commands don't exist in Windows. Instead, I used 'move' and 'del'
Windows is currently not supported by this project. Since Windows does not know the mv
and rm
commands with the appropriate options these two lines will fail.
You are welcome to create a pull request with your changes made to the code. Please make sure to include some kind of is Windows
detection (maybe via the PHP_OS constant) to use the alternative commands.
Alternatively you can use something like git bash or the Windows Subsystem for Linux to get a fully working bash shell where oc-bootstrapper will work.