radiant-docs 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -110,16 +110,21 @@ async function setupCache(cacheDir) {
|
|
|
110
110
|
}
|
|
111
111
|
async function installDependencies(cacheDir) {
|
|
112
112
|
log.info("Installing dependencies (first run only)...");
|
|
113
|
+
if (!fs.existsSync(cacheDir)) {
|
|
114
|
+
log.error(`Cache directory does not exist: ${cacheDir}`);
|
|
115
|
+
process.exit(1);
|
|
116
|
+
}
|
|
117
|
+
log.info(`Cache location: ${cacheDir}`);
|
|
113
118
|
try {
|
|
114
119
|
execSync("npm install --silent --no-fund --no-audit", {
|
|
115
120
|
cwd: cacheDir,
|
|
116
121
|
stdio: "pipe",
|
|
117
|
-
shell: process.env.SHELL || "/bin/sh",
|
|
118
122
|
env: process.env
|
|
119
123
|
});
|
|
120
124
|
log.success("Dependencies installed.");
|
|
121
125
|
} catch (error) {
|
|
122
126
|
log.error("Failed to install dependencies.");
|
|
127
|
+
log.error(`Error details: ${error.message}`);
|
|
123
128
|
throw error;
|
|
124
129
|
}
|
|
125
130
|
}
|
|
@@ -143,7 +148,6 @@ async function runAstroSync(cacheDir) {
|
|
|
143
148
|
execSync("npx astro sync", {
|
|
144
149
|
cwd: cacheDir,
|
|
145
150
|
stdio: "pipe",
|
|
146
|
-
shell: process.env.SHELL || "/bin/sh",
|
|
147
151
|
env: process.env
|
|
148
152
|
});
|
|
149
153
|
} catch {
|