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

account:setup cli mode executes in interactive mode without -i #812

Open
ricardoavelocity opened this issue Jun 28, 2024 · 4 comments
Open
Assignees
Labels
enhancement New feature or request not a bug

Comments

@ricardoavelocity
Copy link

Select the SuiteCloud tool where you encountered the issue

SuiteCloud CLI

Version of the SuiteCloud Tool

1.9.0

Operating system

Sonoma 14.5

Node Version / VSCode Version

node v20.10.0

JAVA Version

n/a

Bug description

When trying to get the current environment, or set a new environment, account:setup always triggers the interactive interface making programatic tasks impossible. There's no way to confirm which environment the user is connected to, nor to change it.

Steps To Reproduce

suitecloud account:setup

Actual Output

? Select or create an authentication ID (a custom alias you give to a specific account-role combination):
***The authentication ID that you select or create will be set up as default. (Use arrow keys)
❯ Create a new authentication ID.
──────────────
Select a configured authentication ID:
etc.

Expected Output

The currently selected authentication ID.

Anything else?

This makes building safe scripts inviable, we're at risk of a user running scripts against production unintentionally.

@antoniofruci antoniofruci self-assigned this Jul 1, 2024
@antoniofruci
Copy link
Member

Hi @ricardoavelocity,

Can you please give more details how you are trying to set up the environment so that we can have a better understanding of your use case?

@ricardoavelocity
Copy link
Author

ricardoavelocity commented Jul 2, 2024 via email

@alisyed-19
Copy link
Member

@ricardoavelocity

So just to understand. Your need is that, As a user, you should be able to run account:setup command non-interactively.
And by running that command you should be able to see your currently set authid (the default account) for the project, and also should be able to change it non-interactively?

FYI: You can programatically check the current authid (account set for the project), in project.json file, and also you can write a script to change the authid in that file.

@ricardoavelocity
Copy link
Author

ricardoavelocity commented Jul 4, 2024 via email

@alisyed-19 alisyed-19 added the enhancement New feature or request label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request not a bug
Projects
None yet
Development

No branches or pull requests

3 participants