Skip to content

Commit

Permalink
Fix unstaged changes in index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Safonkin committed Aug 20, 2021
1 parent 9480036 commit 0067f02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7853,14 +7853,15 @@ function run() {
}
exports.run = run;
function getVersionFromGlobalJson(globalJsonPath) {
let version = "";
let version = '';
const globalJson = JSON.parse(
// .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649
fs.readFileSync(globalJsonPath, { encoding: 'utf8' }).trim());
if (globalJson.sdk && globalJson.sdk.version) {
version = globalJson.sdk.version;
const rollForward = globalJson.sdk.rollForward;
if (rollForward && (rollForward === 'latestFeature' || rollForward === 'latestPatch')) {
if (rollForward &&
(rollForward === 'latestFeature' || rollForward === 'latestPatch')) {
const [major, minor] = version.split('.');
version = `${major}.${minor}`;
}
Expand Down

0 comments on commit 0067f02

Please sign in to comment.