Skip to content

Commit 69606b9

Browse files
committed
Let parent create directory, catch failures
1 parent d06df60 commit 69606b9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/console/controllers/MigrateController.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ public function beforeAction($action): bool
202202
}
203203

204204
$this->migrationPath = $this->getMigrator()->migrationPath;
205-
FileHelper::createDirectory($this->migrationPath);
206205
}
207206

208207
// Make sure that the project config YAML exists in case any migrations need to check incoming YAML values
@@ -211,8 +210,12 @@ public function beforeAction($action): bool
211210
$projectConfig->regenerateExternalConfig();
212211
}
213212

214-
if (!$this->traitBeforeAction($action)) {
215-
return false;
213+
try {
214+
if (!parent::beforeAction($action)) {
215+
return false;
216+
}
217+
} catch (InvalidConfigException $e) {
218+
return true;
216219
}
217220

218221
return true;

0 commit comments

Comments
 (0)