Disable update checks in noninteractive mode
This commit is contained in:
parent
8ae2dee7fc
commit
6464bfb4b7
@ -97,10 +97,12 @@ namespace cryfs {
|
|||||||
cout << "WARNING! This is a debug build. Performance might be slow." << endl;
|
cout << "WARNING! This is a debug build. Performance might be slow." << endl;
|
||||||
#endif
|
#endif
|
||||||
#ifndef CRYFS_NO_UPDATE_CHECKS
|
#ifndef CRYFS_NO_UPDATE_CHECKS
|
||||||
if (!Environment::noUpdateCheck()) {
|
if (Environment::noUpdateCheck()) {
|
||||||
_checkForUpdates();
|
|
||||||
} else {
|
|
||||||
cout << "Automatic checking for security vulnerabilities and updates is disabled." << endl;
|
cout << "Automatic checking for security vulnerabilities and updates is disabled." << endl;
|
||||||
|
} else if (Environment::isNoninteractive()) {
|
||||||
|
cout << "Automatic checking for security vulnerabilities and updates is disabled in noninteractive mode." << endl;
|
||||||
|
} else {
|
||||||
|
_checkForUpdates();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# warning Update checks are disabled. The resulting executable will not go online to check for newer versions or known security vulnerabilities.
|
# warning Update checks are disabled. The resulting executable will not go online to check for newer versions or known security vulnerabilities.
|
||||||
|
Loading…
Reference in New Issue
Block a user