algolia / cli

🔍 Algolia’s official CLI devtool
https://www.algolia.com/doc/tools/cli
MIT License
102 stars 26 forks source link

fix(config) Remove profile without default #44

Closed clemfromspace closed 2 years ago

clemfromspace commented 2 years ago

Bug fix for the removal of a profile, when no existing default profile are set. The opts.config.Default() would be then nil, and accessing the Name would fire a nil pointer error.

We are fixing this by checking / storing the default profile early, and by storing the name in the command options.