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

Ask to run the init command instead of printing an error #209

Open
FranzBusch opened this issue Jan 30, 2025 · 1 comment
Open

Ask to run the init command instead of printing an error #209

FranzBusch opened this issue Jan 30, 2025 · 1 comment

Comments

@FranzBusch
Copy link
Member

I just installed Swiftly fresh on my system and tried to run swiftly list but was faced with this error

Error(message: "Could not load swiftly\'s configuration file at /Users/franzbusch/Library/Application Support/swiftly/config.json.\n\nTo begin using swiftly you can install it: \'swiftly init\'.")

It would be great if this auto prompts to run swiftly init instead of leaving me to type it.

@cmcgee1024
Copy link
Member

@FranzBusch thanks for reporting this. There was a fix for the error message unwrapping that was merged into the main branch after the cut of the 0.4.0-dev release that should make the error message easier to read.

In terms of auto-prompting, would swiftly then block waiting on user input in this case? If so, how would one disable the prompt in an automated process with an --assume-yes/-y given that this can happen for any swiftly subcommand, such as ones that don't support that flag? The swiftly init subcommand has a good set of flags and options to control the init behaviour in headless environments.

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

No branches or pull requests

2 participants