From 6464bfb4b7a15417c0b5d460715bfe0c2ab899d3 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sun, 25 Sep 2016 11:40:01 +0200 Subject: [PATCH] Disable update checks in noninteractive mode --- src/cryfs-cli/Cli.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cryfs-cli/Cli.cpp b/src/cryfs-cli/Cli.cpp index d94688d2..976a9899 100644 --- a/src/cryfs-cli/Cli.cpp +++ b/src/cryfs-cli/Cli.cpp @@ -97,10 +97,12 @@ namespace cryfs { cout << "WARNING! This is a debug build. Performance might be slow." << endl; #endif #ifndef CRYFS_NO_UPDATE_CHECKS - if (!Environment::noUpdateCheck()) { - _checkForUpdates(); - } else { + if (Environment::noUpdateCheck()) { 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 # warning Update checks are disabled. The resulting executable will not go online to check for newer versions or known security vulnerabilities.