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
|
||||
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) {
|
||||
console.error("Error getting git info:", error);
|
||||
console.error("Stderr:", stderr);
|
||||
return res.json({
|
||||
commitId: "unknown",
|
||||
commitAge: "unknown",
|
||||
commitAge: "dev mode",
|
||||
error: true,
|
||||
details: error.message
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user