Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make general improvements #199

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

fix: make general improvements #199

wants to merge 4 commits into from

Conversation

parishahla
Copy link
Member

No description provided.

@eyeamnoob eyeamnoob self-requested a review December 2, 2024 09:01
Copy link
Contributor

@eyeamnoob eyeamnoob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far.

src/base.ts Outdated
Comment on lines 262 to 268
const { api_token } = config.account
? await this.getAccount(config.account)
: await this.getCurrentAccount();

config['api-token'] = config['api-token'] || api_token;
config.region = config.region || region;
// config.region = config.region || region;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget that all accounts have a region field in the global configuration file liara-auth.json

I believe we shouldn't modify this global config file. To eliminate the prompt asking for the region, we can simply set a fallback region to "IRAN" and never prompt the user for a region.

Additionally, we should only remove the --region flag for simplicity.

For backward compatibility, in my opinion, we should automatically set the region to "IRAN". This ensures nothing unexpected happens in the CLI and keeps the region field hidden from the user.

This approach will streamline the process and improve the user experience.

PING @mhemrg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants