Skip to content

Commit

Permalink
return unknown if we can't extract the version number of ember and em…
Browse files Browse the repository at this point in the history
…ber-cli
  • Loading branch information
djones committed Jun 30, 2017
1 parent d8b176f commit 096ac9b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ module.exports = {
this._environmentInfoCache = [
`ember/${this._emberSourceVersion()}`,
`ember-cli/${this._emberCliVersion()}`
].filter(function(el) {
return !el.match(/\/$/);
}).join('; ');
].join('; ');
}

return this._environmentInfoCache;
Expand All @@ -140,15 +138,15 @@ module.exports = {
try {
return require('ember-source/package.json').version;
} catch (e) {
return '';
return 'unknown';
};
},

_emberCliVersion: function() {
try {
return require('ember-cli/lib/utilities/version-utils').emberCLIVersion();
} catch (e) {
return '';
return 'unknown';
};
},

Expand Down

0 comments on commit 096ac9b

Please sign in to comment.