Skip to content

Commit

Permalink
fix(api): project 'alias'es (symlinks) should be resolved before chec…
Browse files Browse the repository at this point in the history
…king for 'selfhosted'
  • Loading branch information
coolaj86 committed Dec 15, 2024
1 parent c94b4cf commit de2d391
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions _webi/serve-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,20 @@ InstallerServer.helper = async function ({

console.log(`dbg: Get Project Installer Type for '${projectName}':`);
let proj = await Builds.getProjectType(projectName);
console.log(proj);
if (proj.type === 'alias') {
console.log(`dbg: alias`, proj);
projectName = proj.detail;
proj = await Builds.getProjectType(projectName); // an alias should never resolve to an alias
}
console.log(`dbg: proj`, proj);

let validTypes = ['alias', 'selfhosted', 'valid'];
let validTypes = ['selfhosted', 'valid'];
if (!validTypes.includes(proj.type)) {
let msg = `'${projectName}' doesn't have an installer: '${proj.type}': '${proj.detail}'`;
let err = new Error(msg);
err.code = 'ENOENT';
throw err;
}
if (proj.type === 'alias') {
projectName = proj.detail;
}

let tmplParams = {
pkg: projectName,
Expand Down

0 comments on commit de2d391

Please sign in to comment.