mirror of
https://github.com/DeNNiiInc/Web-Page-Performance-Test.git
synced 2026-04-17 20:05:58 +00:00
Fix Git Info API: Use absolute path to git binary
This commit is contained in:
@@ -14,13 +14,15 @@ app.use('/reports', express.static(path.join(__dirname, 'reports')));
|
|||||||
|
|
||||||
// API Endpoint: Git Info
|
// API Endpoint: Git Info
|
||||||
app.get("/api/git-info", (req, res) => {
|
app.get("/api/git-info", (req, res) => {
|
||||||
exec('git log -1 --format="%H|%cr"', (error, stdout, stderr) => {
|
exec('/usr/bin/git log -1 --format="%H|%cr"', (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error("Error getting git info:", error);
|
console.error("Error getting git info:", error);
|
||||||
|
console.error("Stderr:", stderr);
|
||||||
return res.json({
|
return res.json({
|
||||||
commitId: "unknown",
|
commitId: "unknown",
|
||||||
commitAge: "unknown",
|
commitAge: "dev mode",
|
||||||
error: true,
|
error: true,
|
||||||
|
details: error.message
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user