Skip to content

Commit 981ad3c

Browse files
authored
prevent non eligible patch to run multiple time
1 parent 637260f commit 981ad3c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Patcher.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ protected function patch(string $file, int $batch): void
7878

7979
$runTime = round(microtime(true) - $startTime, 2);
8080

81-
if (!$patch->isPerpetual) {
82-
$this->repository->log($name, $batch);
83-
}
84-
8581
$this->write(
8682
TwoColumnDetail::class,
8783
$info,
@@ -90,10 +86,14 @@ protected function patch(string $file, int $batch): void
9086
} else {
9187
$this->write(
9288
TwoColumnDetail::class,
93-
"Patching: $info is not eligible to run in current condition",
89+
"$info is not eligible to run in current condition",
9490
'<fg=yellow;options=bold>SKIPPED</>'
9591
);
9692
}
93+
94+
if (!$patch->isPerpetual) {
95+
$this->repository->log($name, $batch);
96+
}
9797
}
9898

9999
/**

0 commit comments

Comments
 (0)