diff --git a/src/Installer/MoodleInstaller.php b/src/Installer/MoodleInstaller.php index 8a01e628..45ad3149 100644 --- a/src/Installer/MoodleInstaller.php +++ b/src/Installer/MoodleInstaller.php @@ -66,7 +66,10 @@ public function install(): void $this->moodle->directory, ]; - $this->execute->mustRun(new Process($cmd, null, null, null, null)); + // Only run git clone if it does not already exist + if (!is_dir($this->moodle->directory)) { + $this->execute->mustRun(new Process($cmd, null, null, null, null)); + } // Expand the path to Moodle so all other installers use absolute path. $this->moodle->directory = $this->expandPath($this->moodle->directory);