Fix disable login prompt environment variable.
@@ -17,7 +17,7 @@ from conans.errors import AuthenticationException, ForbiddenException,\
from uuid import getnode as get_mac
import hashlib
from conans.util.log import logger
-from os import getenv
+from conans.util.env_reader import get_env
def input_credentials_if_unauthorized(func):
@@ -44,8 +44,7 @@ def input_credentials_if_unauthorized(func):
if "bintray" in remote.url:
self._user_io.out.info('If you don\'t have an account sign up here: '
'https://bintray.com/signup/oss')
- disable_login_prompt = getenv("CONAN_DISABLE_LOGIN_PROMPT", "False")
- if disable_login_prompt == "True":
+ if get_env("CONAN_DISABLE_LOGIN_PROMPT", False):
raise AuthenticationException('User "%s" not authenticated' % self.user)
return retry_with_new_token(self, *args, **kwargs)
else:
