We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 958e023 commit a773f3eCopy full SHA for a773f3e
src/CliConfiguration.php
@@ -64,7 +64,13 @@ public function __destruct()
64
*/
65
public function getAccessToken(): string
66
{
67
- return $this->get('token');
+ $token = getenv('YMIR_API_TOKEN');
68
+
69
+ if (!is_string($token)) {
70
+ $token = $this->get('token');
71
+ }
72
73
+ return (string) $token;
74
}
75
76
/**
@@ -84,7 +90,7 @@ public function getActiveTeamId(): int
84
90
85
91
public function hasAccessToken(): bool
86
92
87
- return $this->has('token');
93
+ return !empty($this->getAccessToken());
88
94
89
95
96
0 commit comments