Skip to content

Commit 7b8b151

Browse files
committed
fix: cli login use endpoint
1 parent 1130d02 commit 7b8b151

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/cli/lib/commands/generic.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const DEFAULT_ENDPOINT = 'https://cloud.appwrite.io/v1';
1313

1414
const loginCommand = async ({ email, password, endpoint, mfa, code }) => {
1515
const oldCurrent = globalConfig.getCurrentSession();
16-
let configEndpoint = endpoint ?? DEFAULT_ENDPOINT;
16+
17+
const configEndpoint = endpoint ?? globalConfig.getEndpoint() ?? DEFAULT_ENDPOINT;
1718

1819
if (globalConfig.getCurrentSession() !== '') {
1920
log('You are currently signed in as ' + globalConfig.getEmail());

0 commit comments

Comments
 (0)