fix getVersion for install -c
This commit is contained in:
parent
4c9f8cf0bd
commit
66836adbc3
1 changed files with 4 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ function getVersion(path) {
|
|||
return fs.readFileSync(path + "/.git-ref", "utf8");
|
||||
if (fs.existsSync(path + "/.git/ORIG_HEAD"))
|
||||
return fs.readFileSync(path + "/.git/ORIG_HEAD", "utf8");
|
||||
if (fs.existsSync(path + "/.sourcemint/source.json")) {
|
||||
var json = fs.readFileSync(path + "/.sourcemint/source.json", "utf8");
|
||||
return JSON.parse(json).url.split("/").pop();
|
||||
}
|
||||
}
|
||||
|
||||
if (process.argv.indexOf("-c") > 0) try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue