javascript-solid-server 0.0.42 → 0.0.43
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/package.json +1 -1
- package/src/handlers/git.js +10 -1
package/package.json
CHANGED
package/src/handlers/git.js
CHANGED
|
@@ -206,11 +206,20 @@ export async function handleGit(request, reply) {
|
|
|
206
206
|
if (code === 0 && isGitWriteOperation(urlPath) && gitInfo.isRegular) {
|
|
207
207
|
const checkout = spawn('git', ['checkout', '-f'], {
|
|
208
208
|
cwd: repoAbs,
|
|
209
|
-
env: {
|
|
209
|
+
env: {
|
|
210
|
+
...process.env,
|
|
211
|
+
GIT_DIR: gitInfo.gitDir,
|
|
212
|
+
GIT_WORK_TREE: repoAbs
|
|
213
|
+
}
|
|
210
214
|
});
|
|
211
215
|
checkout.on('error', (err) => {
|
|
212
216
|
console.error('Auto-checkout failed:', err.message);
|
|
213
217
|
});
|
|
218
|
+
checkout.on('close', (checkoutCode) => {
|
|
219
|
+
if (checkoutCode !== 0) {
|
|
220
|
+
console.error('Auto-checkout exited with code:', checkoutCode);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
214
223
|
}
|
|
215
224
|
|
|
216
225
|
resolve();
|