diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-10-25T14·38+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-10-25T14·38+0000 |
commit | f4d44a002688262d33093494a7fea1bb11b97ac9 (patch) | |
tree | 9768179865220106bd1c0103361ded0967c059c8 /src/libmain | |
parent | 3ade3e7721df981614bbb2420baeb84e58085967 (diff) |
* Allow certain operations to succeed even if we don't have write
permission to the Nix store or database. E.g., `nix-env -qa' will work, but `nix-env -qas' won't (the latter needs DB access). The option `--readonly-mode' forces this mode; otherwise, it's only activated when the database cannot be opened.
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 24f6ec4df92b..73388c96e8cd 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -160,6 +160,8 @@ static void initAndRun(int argc, char * * argv) throw UsageError(format("`--max-jobs' requires a non-negative integer")); maxBuildJobs = n; } + else if (arg == "--readonly-mode") + readOnlyMode = true; else remaining.push_back(arg); } |