Assert the project language and type are valid
This commit is contained in:
parent
d541f064a5
commit
e499d42fa5
6 changed files with 54 additions and 0 deletions
|
@ -39,6 +39,11 @@ final class PackageInstallCommand extends AbstractCommand
|
|||
workingDir: $workingDir,
|
||||
))->getLanguage();
|
||||
|
||||
assert(
|
||||
assertion: ProjectLanguage::isValid($language),
|
||||
description: sprintf('%s is not a supported language.', $language),
|
||||
);
|
||||
|
||||
switch ($language) {
|
||||
case ProjectLanguage::PHP->value:
|
||||
$process = Process::create(
|
||||
|
|
Reference in a new issue