mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
allow running without .git/HEAD
This commit is contained in:
parent
624101820a
commit
a584efecc8
@ -3,9 +3,13 @@ var assert = require("assert");
|
||||
module.exports = function(manifest, installPath) {
|
||||
if (!manifest) {
|
||||
manifest = require(__dirname + "/../package.json");
|
||||
manifest.revision =
|
||||
manifest.revision ||
|
||||
require("c9/git").getHeadRevisionSync(__dirname + "/..");
|
||||
if (!manifest.revision) {
|
||||
try {
|
||||
manifest.revision = require("c9/git").getHeadRevisionSync(__dirname + "/..");
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var path = require("path");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user