Skip to content

Commit 70bd32d

Browse files
Merge pull request #86 from TheDragonCode/3.x
Change message when skipping actions running
2 parents 09b0e6c + c3871f3 commit 70bd32d

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/Services/Migrator.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function runUp(string $filename, int $batch, Options $options): void
4848
$action = $this->resolveAction($path);
4949
$name = $this->resolveActionName($path);
5050

51-
if ($this->allowAction($action, $name, $options)) {
51+
if ($this->allowAction($action, $options)) {
5252
$this->notification->task($name, function () use ($action, $name, $batch) {
5353
$this->hasAction($action, '__invoke')
5454
? $this->runAction($action, '__invoke')
@@ -118,21 +118,13 @@ protected function deleteLog(string $name): void
118118
$this->repository->delete($name);
119119
}
120120

121-
protected function allowAction(Action $action, string $name, Options $options): bool
121+
protected function allowAction(Action $action, Options $options): bool
122122
{
123123
if (! $this->allowEnvironment($action)) {
124-
$this->notification->info("Action: $name was skipped on this environment");
125-
126-
return false;
127-
}
128-
129-
if ($this->disallowBefore($action, $options)) {
130-
$this->notification->info("Action: $name was skipped by 'before' option");
131-
132124
return false;
133125
}
134126

135-
return true;
127+
return ! ($this->disallowBefore($action, $options));
136128
}
137129

138130
protected function allowEnvironment(Action $action): bool

0 commit comments

Comments
 (0)