diff options
author | Jude Taylor <me@jude.bio> | 2016-08-15T17·46-0700 |
---|---|---|
committer | Jude Taylor <me@jude.bio> | 2016-08-15T17·46-0700 |
commit | 7b006122aee221f1ec69b6439bf86e79190491c1 (patch) | |
tree | 7409c1d8ac9db0b8d7780904945cc858b97d7e39 | |
parent | adf0216d98146f925659e8a5f83a9c653ae78b22 (diff) |
ensure presence of directories
-rw-r--r-- | src/resolve-system-dependencies/resolve-system-dependencies.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc index 641069c2c7ac..4b2f55f09580 100644 --- a/src/resolve-system-dependencies/resolve-system-dependencies.cc +++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc @@ -171,12 +171,17 @@ int main(int argc, char ** argv) { uname(&_uname); - cacheDir = (format("%1%/dependency-maps/%2%-%3%-%4%") - % settings.nixStateDir + auto cacheParentDir = (format("%1%/dependency-maps") % settings.nixStateDir).str(); + + cacheDir = (format("%1%/%2%-%3%-%4%") + % cacheParentDir % _uname.machine % _uname.sysname % _uname.release).str(); + mkdir(cacheParentDir.c_str(), 0755); + mkdir(cacheDir.c_str(), 0755); + auto store = openStore(); auto drv = store->derivationFromPath(Path(argv[1])); |