aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-02-02 12:15:10 +0100
committerDaniel Mueller <deso@posteo.net>2020-09-05 11:36:12 -0700
commit9929c4bf66ff747a397d87c7291456b6ff09bca8 (patch)
treee6fc895ccd05d2cb397ba07e526838e8d1647c35 /src/config.rs
parent9a6d04f3bfffe63021d68efad9fbf0ae3987064c (diff)
downloadnitrocli-9929c4bf66ff747a397d87c7291456b6ff09bca8.tar.gz
nitrocli-9929c4bf66ff747a397d87c7291456b6ff09bca8.tar.bz2
Add --no-cache option to bypass PIN cache
This patch adds a new --no-cache option that corresponds to the NITROCLI_NO_CACHE environment variable and the no_cache configuration. This makes the user interface more consistent as all configuration items are now backed by both an environment variable and a command-line option.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index d146c14..0a220a5 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -65,6 +65,9 @@ impl Config {
if args.model.is_some() {
self.model = args.model;
}
+ if args.no_cache {
+ self.no_cache = true;
+ }
if args.verbose > 0 {
self.verbosity = args.verbose;
}