We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6689ac7 commit f75ac4bCopy full SHA for f75ac4b
src/utils.ts
@@ -6,5 +6,12 @@ export const saveStorePaths = async () => {
6
await exec("sh", ["-c", "nix path-info --all --json > /tmp/store-paths"]);
7
};
8
export const getStorePaths = async () => {
9
- return (JSON.parse(await readFile("/tmp/store-paths", "utf8")) as { path: string }[]).map((path) => path.path);
+ const rawStorePaths = JSON.parse(await readFile("/tmp/store-paths", "utf8")) as { path: string }[];
10
+
11
+ // compatibility with Nix 2.18
12
+ if (Array.isArray(rawStorePaths)) {
13
+ return rawStorePaths.map((path) => path.path);
14
+ };
15
16
+ return Object.keys(rawStorePaths);
17
0 commit comments