diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd0bfa6..6e26292 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,3 +35,4 @@ jobs: uses: ./ with: version: ${{ matrix.versions }} + - run: AdvancedInstaller.com /help diff --git a/dist/index.js b/dist/index.js index 78e4bf6..1dd7327 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6096,14 +6096,14 @@ function run() { return __awaiter(this, void 0, void 0, function* () { try { let version = core.getInput('version'); - let toolsPath = _getToolCacheDirectory(); + let toolCacheDir = _getToolCacheDirectory(); core.info(`Downloading Advanced Installer release ${version}`); let downloadFile = path.join(_getTempDirectory(), uuid.v4(), 'advinst.msi'); yield io.mkdirP(path.dirname(downloadFile)); let url = `https://www.advancedinstaller.com/downloads/${version}/advinst.msi`; let downloadPath = yield tc.downloadTool(url, downloadFile); core.debug(`Downloaded installer from ${url}`); - let targetPath = `${toolsPath}\\advinst`; + let targetPath = `${toolCacheDir}\\advinst`; let logFile = `${_getTempDirectory()}\\advinst_install.log`; let args = [ '/a', @@ -6118,9 +6118,10 @@ function run() { if (exitCode != 0) { throw new Error(`Failed to install Advanced Installer. Exit code ${exitCode}.`); } + let binPath = path.join(targetPath, 'bin\\x86'); core.debug(`Configuring paths with Advanced Installer`); - core.exportVariable('ADVANCEDINSTALLER_ROOT', targetPath); - core.addPath(targetPath); + core.exportVariable('ADVANCEDINSTALLER_ROOT', binPath); + core.addPath(binPath); core.info(`Successfully installed Advanced Installer ${version}`); } catch (error) { diff --git a/src/index.ts b/src/index.ts index 2ffcfd6..909c77f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,7 @@ import * as uuid from 'uuid'; async function run() { try { let version = core.getInput('version'); - let toolsPath = _getToolCacheDirectory(); + let toolCacheDir = _getToolCacheDirectory(); core.info(`Downloading Advanced Installer release ${version}`); @@ -20,7 +20,7 @@ async function run() { let downloadPath = await tc.downloadTool(url, downloadFile); core.debug(`Downloaded installer from ${url}`); - let targetPath = `${toolsPath}\\advinst`; + let targetPath = `${toolCacheDir}\\advinst`; let logFile = `${_getTempDirectory()}\\advinst_install.log`; let args = [ @@ -38,9 +38,10 @@ async function run() { throw new Error(`Failed to install Advanced Installer. Exit code ${exitCode}.`); } + let binPath = path.join(targetPath, 'bin\\x86'); core.debug(`Configuring paths with Advanced Installer`); - core.exportVariable('ADVANCEDINSTALLER_ROOT', targetPath); - core.addPath(targetPath); + core.exportVariable('ADVANCEDINSTALLER_ROOT', binPath); + core.addPath(binPath); core.info(`Successfully installed Advanced Installer ${version}`); } catch (error: any) {