diff options
author | isaacs <i@izs.me> | 2010-11-18 01:49:21 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-11-18 01:49:21 +0300 |
commit | 34c9fb1eeb9ba5dba2137d633777091101888264 (patch) | |
tree | 7705907a9334e15454c2c7941586f7468a3df960 /lib/init.js | |
parent | b0839f061b4d4abc1775d0d4d562aa0287c23754 (diff) |
Fix when git describe --tags isn't valid.
Diffstat (limited to 'lib/init.js')
-rw-r--r-- | lib/init.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/init.js b/lib/init.js index 705077486..f7be0f138 100644 --- a/lib/init.js +++ b/lib/init.js @@ -205,7 +205,7 @@ function defaultVersion (folder, data, cb) { if (data.version) return cb(null, data.version) process.chdir(folder) exec("git", ["describe", "--tags"], process.env, false, function (er, code, out) { - out = out.trim() + out = (out || "").trim() if (semver.valid(out)) return cb(null, out) return cb(null, "0.0.0") }) |