From 9d054a07dc742d11a23555563eece2dc19dc8af3 Mon Sep 17 00:00:00 2001 From: Abdullatif Badr <0x4bdullatif@gmail.com> Date: Tue, 19 Oct 2021 14:32:47 +0300 Subject: [PATCH] Check the operating system when deleting the "public/installer" folder --- packages/Webkul/Core/src/Console/Commands/Install.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/Webkul/Core/src/Console/Commands/Install.php b/packages/Webkul/Core/src/Console/Commands/Install.php index e6deebadb..6ecb34119 100644 --- a/packages/Webkul/Core/src/Console/Commands/Install.php +++ b/packages/Webkul/Core/src/Console/Commands/Install.php @@ -75,7 +75,11 @@ class Install extends Command // removing the installer directory if (is_dir('public/installer')) { - shell_exec('rm -rf public/installer'); + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + shell_exec('rmdir /s/q public\\installer'); + } else { + shell_exec('rm -rf public/installer'); + } } // final information