Skip to content

Commit

Permalink
FIX: don't attempt to configure a host that's missing from the VU hos…
Browse files Browse the repository at this point in the history
…t mapping.
  • Loading branch information
rwaldron committed Feb 16, 2021
1 parent daee4d4 commit e299493
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/host-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const VU_HOST_DETAILS = {
// This version of quickjs does not include the necessary
// host defined environment extensions to execute code in
// eshost.
quickjs: [],
quickjs: ['QuickJS', 'quickjs', ['']],
spidermonkey: ['SpiderMonkey', 'sm', 'jsshell', ['web']],
v8: ['V8', 'v8', 'd8', ['web']],
xs: ['Moddable XS', 'xs', 'xs', ['embedded']],
Expand All @@ -164,6 +164,10 @@ exports.configureFromVersionUpdater = (config, vu, vuRoot, hostPrefix = '') => {
}

for (let engine of engines) {
if (!VU_HOST_DETAILS[vu]) {
continue;
}

let [
hostName,
binaryName,
Expand All @@ -183,7 +187,7 @@ exports.configureFromVersionUpdater = (config, vu, vuRoot, hostPrefix = '') => {
console.log(chalk.red(`"${hostName}" could not be configured because ${hostPath} was not found.`));
continue;
}
const version = status[engine] || status.installed[engine].version;
const version = status[engine] || (status.installed[engine] && status.installed[engine].version);

if (hostPrefix) {
hostName = `${hostPrefix}-${hostName}`;
Expand Down

0 comments on commit e299493

Please sign in to comment.