Skip to content

Commit

Permalink
Merge pull request #162 from flxsource/160-fix-bundled-name
Browse files Browse the repository at this point in the history
Fix selecting the bundled PHP version
  • Loading branch information
rafajaques authored Oct 17, 2016
2 parents d1f46a7 + 7fa5539 commit f86402f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/js/binary.operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ function binaryLineGetTemplate(version, path, inUse) {
].join('\n');
}

function binaryGetBundledVersion() {
return binaryGetVersion(getBundledPhpPath(), false);
}

/**
* Binary list functions
*/
Expand All @@ -100,8 +104,9 @@ function binaryUpdateList() {
});

// Adds bundled version manually
const bundledVersion = binaryGetVersion(getBundledPhpPath(), false);
$('#binary-list').append(binaryLineGetTemplate(bundledVersion, 'Integrated version', (inUse === 'bundled')));
const bundledVersion = binaryGetBundledVersion();
$('#binary-list').append(
binaryLineGetTemplate(bundledVersion, 'Integrated version', (inUse === bundledVersion)));
}

/**
Expand All @@ -120,7 +125,7 @@ function phpGetCurrVersion() {
/* Updates binary path used by the runner */
function updatePhpPath() {
// Are we using bundled version?
if (conf.get('php.default') === 'bundled') {
if (conf.get('php.default') === binaryGetBundledVersion()) {
phpPath = getBundledPhpPath();
} else {
phpPath = conf.get('php.versions.' + conf.get('php.default'));
Expand Down

0 comments on commit f86402f

Please sign in to comment.