Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mv and rm commands don't work under Windows #10

Open
trnikon opened this issue May 27, 2017 · 1 comment
Open

mv and rm commands don't work under Windows #10

trnikon opened this issue May 27, 2017 · 1 comment

Comments

@trnikon
Copy link

trnikon commented May 27, 2017

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'

@tobias-kuendig
Copy link
Member

tobias-kuendig commented May 29, 2017

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 tobias-kuendig changed the title Install directory could not be removed mv and rm commands don't work under Windows May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants