Skip to content

Commit b95701d

Browse files
committed
fix(core): Make OC_PASS actually work for occ user:auth-tokens:add --password-from-env
Signed-off-by: provokateurin <[email protected]>
1 parent 2606f7b commit b95701d

File tree

1 file changed

+2
-2
lines changed
  • core/Command/User/AuthTokens

1 file changed

+2
-2
lines changed

core/Command/User/AuthTokens/Add.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6262
}
6363

6464
if ($input->getOption('password-from-env')) {
65-
$password = getenv('NC_PASS') ?? getenv('OC_PASS');
65+
$password = getenv('NC_PASS') ?: getenv('OC_PASS');
6666
if (!$password) {
67-
$output->writeln('<error>--password-from-env given, but NC_PASS is empty!</error>');
67+
$output->writeln('<error>--password-from-env given, but NC_PASS/OC_PASS is empty!</error>');
6868
return 1;
6969
}
7070
} elseif ($input->isInteractive()) {

0 commit comments

Comments
 (0)