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 16, 2024
1 parent 40316a8 commit 83a6d02
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 83a6d02

Please sign in to comment.