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
parser.add_argument('-d', '--db', default=_DEFAULT_STORAGE_ROOT, help='Path to the {db} database file, or path to the directory that contains the {db} database file, e.g. "/my/path/{db}", or "/my/path"'.format(db=db_constants.DB_FILE_NAME))
68
-
parser.add_argument('-c', '--config', help='Path to the Prime Backup config.json file. If omitted, attempt to load ../config/prime_backup/config.json relative to the database directory')
68
+
parser.add_argument('-c', '--config', help='Path to the Prime Backup config.json file. If omitted, attempt to load ../config/prime_backup/config.json relative to the database directory. Commands that need user backup settings, such as make and back, fail if no config file is found; other commands use default config')
69
69
parser.add_argument('--version', action='store_true', help='Show version and exit')
logger.get().info('Config file auto-detected and loaded from {!r}'.format(auto_config_path.as_posix()))
60
+
elifself.requires_user_config_file():
61
+
logger.get().error('Config file is required for this command, but it was not provided and the auto-detected path {!r} does not exist'.format(auto_config_path.as_posix()))
62
+
ErrorReturnCodes.invalid_argument.sys_exit()
57
63
else:
58
64
config=Config.get_default()
59
65
logger.get().info('Config file not provided; auto-detected path {!r} does not exist, using default config'.format(auto_config_path.as_posix()))
60
66
else:
61
-
config=cls.__load_config(config_path)
67
+
config=self.__load_config(config_path)
62
68
logger.get().info('Config file loaded from {!r}'.format(config_path.as_posix()))
0 commit comments