From de2d3916e0c339807e33cd12b4766e98e8241b67 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 15 Dec 2024 05:27:00 +0000 Subject: [PATCH] fix(api): project 'alias'es (symlinks) should be resolved before checking for 'selfhosted' --- _webi/serve-installer.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/_webi/serve-installer.js b/_webi/serve-installer.js index 21939993c..02d1f8aa8 100644 --- a/_webi/serve-installer.js +++ b/_webi/serve-installer.js @@ -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,