Skip to content

Commit dede4bc

Browse files
authored
Merge pull request #40 from ShoppinPal/add-robofile-env-value-prompt-support
Add prompt for required env values in robofile
2 parents cd46f11 + b822f3a commit dede4bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Robo/RoboFileAbstract.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ protected function updateEnvFile($doUpdate = false)
176176
}
177177
}
178178

179+
foreach ($this->getPromptedEnvValues() as $key => $prompt) {
180+
if (empty($env[$key])) {
181+
$additions[$key] = $this->ask($prompt);
182+
}
183+
}
184+
179185
if (!empty($additions)) {
180186
$content = file_get_contents($envPath);
181187

@@ -367,4 +373,9 @@ protected function getWritableDirectories($projectName)
367373
'/var/log/' . $projectName . '/error',
368374
];
369375
}
376+
377+
protected function getPromptedEnvValues(): array
378+
{
379+
return [];
380+
}
370381
}

0 commit comments

Comments
 (0)