oc-bootstrapper icon indicating copy to clipboard operation
oc-bootstrapper copied to clipboard

`mv` and `rm` commands don't work under Windows

Open trnikon opened this issue 7 years ago • 1 comments

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'

trnikon avatar May 27 '17 21:05 trnikon

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.

tobias-kuendig avatar May 29 '17 14:05 tobias-kuendig