diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-06-20 12:37:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-20 12:37:56 +0200 |
commit | 4bdb2b1dff11d433ee40bdaad5798a70e8483971 (patch) | |
tree | 5c2322641642d4dd78d8ecead4246b8147fa3574 /core/Command/User/AuthTokens | |
parent | 2606f7b7dde9b3f252cc7d97fc7b285640e2c659 (diff) | |
parent | ed3868932f59a8af0cb28f336f2eae8f2bcfec52 (diff) | |
download | nextcloud-server-master.tar.gz nextcloud-server-master.zip |
fix(core): Make --password-from-env work with NC_PASS everywhere
Diffstat (limited to 'core/Command/User/AuthTokens')
-rw-r--r-- | core/Command/User/AuthTokens/Add.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Command/User/AuthTokens/Add.php b/core/Command/User/AuthTokens/Add.php index ad4bf732bd0..89b20535c63 100644 --- a/core/Command/User/AuthTokens/Add.php +++ b/core/Command/User/AuthTokens/Add.php @@ -62,9 +62,9 @@ class Add extends Command { } if ($input->getOption('password-from-env')) { - $password = getenv('NC_PASS') ?? getenv('OC_PASS'); + $password = getenv('NC_PASS') ?: getenv('OC_PASS'); if (!$password) { - $output->writeln('<error>--password-from-env given, but NC_PASS is empty!</error>'); + $output->writeln('<error>--password-from-env given, but NC_PASS/OC_PASS is empty!</error>'); return 1; } } elseif ($input->isInteractive()) { |