You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2018. It is now read-only.
Currently, whenever we try to run a nulecule application using atomicapp, it tries to read configuration data from answers.conf if specified/available. During run, when it discovers, params with missing values, it asks the users for data, and runs the nulecule application. But, it does not save the data asked from the user for reuse during stop. So, stop command for stopping a nulecule application, again asks the user to enter values for params with missing values in answers.conf.
Proposed solution
We can save the config used for running the nulecule app somewhere for reuse. Now, how and where we save this config data generated during runtime is a matter of discussion. I will discuss multiple ways that come to my mind with pros and cons for each of them:
Write generated config (data from answers.conf and user input) data implicitly to answers.conf, if --write-answers is not specified. This approach is very simple to implement, however, the downside to this is that, we are editing user data implicitly. When a user has specified --write-answers to write the runtime config data to a file, it's highly probable that the user is going to use the output answers data in subsequent runs. But, if he has written the answers output to a file other than answers.conf, the user needs to explicitly mention the name of the output file against -a arg to use it for stopping the nulecule application. Not that user friendly, is it? This brings me to my second proposed solution.
We can use a file like .atomicapprc to store runtime config and use it to compliment ANSWERS data. The downside is that it will add another layer of complexity to the code, but will make usability much simpler. Most applications do it this way, i.e. having local *rc files.