Skip to content

Commit 7c230aa

Browse files
author
maljuraysh
committed
bug fix
1 parent b84953d commit 7c230aa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Commands/DeploymentScriptCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ class DeploymentScriptCommand extends Command
1313

1414
public function handle(): int
1515
{
16-
if (config('deployment-script.allow_in_production', false)) {
17-
$this->error("Deploy Script is not allow in Production Environment");
18-
return self::FAILURE;
16+
if (app()->isProduction()) {
17+
if (config('deployment-script.allow_in_production', false)) {
18+
$this->error("Deploy Script is not allow in Production Environment");
19+
return self::FAILURE;
20+
}
1921
}
2022

2123
foreach ($this->getCommands() as $command) {

0 commit comments

Comments
 (0)