-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
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; | ||
} |
There was a problem hiding this comment.
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
No description provided.