diff --git a/cfbs/commands.py b/cfbs/commands.py index 8c1b0622..e136f993 100644 --- a/cfbs/commands.py +++ b/cfbs/commands.py @@ -193,7 +193,26 @@ def init_command(index=None, non_interactive=False) -> int: print( "Initialized an empty project called '{}' in '{}'".format(name, cfbs_filename()) ) - print("To add your first module, type: cfbs add masterfiles") + + """ + The CFBSConfig instance was initally created in main(). Back then + cfbs.json did not exist, thus the instance is empty. By manually deleting + this instance, a new instance will be created loading the now existing + cfbs.json. + """ + CFBSConfig.instance = None + + if prompt_user( + "Do you wish to add default masterfiles?", + choices=YES_NO_CHOICES, + default="yes", + ) in ("yes", "y"): + to_add = "masterfiles" + else: + to_add = prompt_user("Specify masterfiles module or skip if empty", default="") + + if to_add: + return add_command([to_add]) return 0