mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix: panic in non-interactive mode when no providers set up
closes #212 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
@@ -105,6 +105,10 @@ crush run -q "Generate a README for this project"
|
||||
}
|
||||
defer app.Shutdown()
|
||||
|
||||
if !app.Config().IsConfigured() {
|
||||
return fmt.Errorf("no providers configured - please run 'crush' to set up a provider interactively")
|
||||
}
|
||||
|
||||
prompt := strings.Join(args, " ")
|
||||
|
||||
prompt, err = maybePrependStdin(prompt)
|
||||
|
||||
Reference in New Issue
Block a user