databricks / click

The "Command Line Interactive Controller for Kubernetes"
Apache License 2.0
1.49k stars 84 forks source link

Make config write atomic, and write it more often #91

Closed nicklan closed 5 years ago

nicklan commented 5 years ago

It sucks to loose your aliases because click was killed for some reason. This PR makes it so that any time you add/remove and alias, or change context, the config file is written out.

It also makes it so writing the config is atomic (using the atomicfile crate), so it's safe to do this from multiple running instances of Click.