From 3280f1ba91074b34605f9b67ac981fa97f8386f0 Mon Sep 17 00:00:00 2001 From: Hazel Date: Sun, 3 Mar 2024 03:44:47 +0100 Subject: [PATCH] add HAXEPATH because windows --- dist/index.js | 4 +++- src/asset.ts | 1 + src/setup.ts | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 092ba5f..e07e075 100644 --- a/dist/index.js +++ b/dist/index.js @@ -86,6 +86,7 @@ class Asset { async setup() { const toolPath = tool_cache.find(this.name, this.version); if (toolPath) { + console.log(`[${this.name}] found = ${toolPath}`); return toolPath; } return tool_cache.cacheDir(await this.download(), this.name, this.version); @@ -341,11 +342,12 @@ async function setup(version, nightly, cacheDependencyPath) { console.log(`[neko] NEKOPATH = ${nekoPath}`); lib_core.exportVariable('NEKOPATH', nekoPath); lib_core.exportVariable('LD_LIBRARY_PATH', `${nekoPath}:$LD_LIBRARY_PATH`); - console.log(`[haxe] dl start = ${version}`); const haxe = new HaxeAsset(version, nightly); + console.log(`[haxe] dl start = ${version} (${haxe.downloadUrl})`); const haxePath = await haxe.setup(); lib_core.addPath(haxePath); console.log(`[haxe] HAXE_STD_PATH = ${haxePath}/std`); + lib_core.exportVariable('HAXEPATH', haxePath); lib_core.exportVariable('HAXE_STD_PATH', external_node_path_namespaceObject.join(haxePath, 'std')); if (env.platform === 'osx') { // Ref: https://github.com/asdf-community/asdf-haxe/pull/7 diff --git a/src/asset.ts b/src/asset.ts index 35af4f3..47425ce 100644 --- a/src/asset.ts +++ b/src/asset.ts @@ -18,6 +18,7 @@ abstract class Asset { async setup() { const toolPath = tc.find(this.name, this.version); if (toolPath) { + console.log(`[${this.name}] found = ${toolPath}`); return toolPath; } diff --git a/src/setup.ts b/src/setup.ts index c78ab03..76d10cf 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -21,11 +21,12 @@ export async function setup(version: string, nightly: boolean, cacheDependencyPa core.exportVariable('NEKOPATH', nekoPath); core.exportVariable('LD_LIBRARY_PATH', `${nekoPath}:$LD_LIBRARY_PATH`); - console.log(`[haxe] dl start = ${version}`); const haxe = new HaxeAsset(version, nightly); + console.log(`[haxe] dl start = ${version} (${haxe.downloadUrl})`); const haxePath = await haxe.setup(); core.addPath(haxePath); console.log(`[haxe] HAXE_STD_PATH = ${haxePath}/std`); + core.exportVariable('HAXEPATH', haxePath); core.exportVariable('HAXE_STD_PATH', path.join(haxePath, 'std')); if (env.platform === 'osx') {