fix: unable to locate executable file err

cuz the binary is wraps in directory

Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
Dwi Siswanto 2025-01-12 09:43:18 +07:00
parent adc0faf08f
commit da3b74f054
No known key found for this signature in database
GPG Key ID: 3BB198907EF44CED
2 changed files with 8 additions and 6 deletions

7
dist/index.js vendored
View File

@ -94,7 +94,7 @@ function get_slim() {
const_1.core.notice(`slim ${VER} found in cache`);
}
else {
slimPath = const_1.path.join(process.env.GITHUB_WORKSPACE, '../', 'slim');
const parentWorkspace = const_1.path.join(process.env.GITHUB_WORKSPACE, '../');
let srcPath;
try {
const_1.core.debug(`Downloading slim ${VER} for ${KERNEL}/${MACHINE}...`);
@ -107,15 +107,16 @@ function get_slim() {
try {
const_1.core.debug(`Extracting slim ${VER}...`);
if (EXT === 'zip') {
extractedPath = yield const_1.tc.extractZip(srcPath, slimPath);
extractedPath = yield const_1.tc.extractZip(srcPath, parentWorkspace);
}
else { // tar.gz
extractedPath = yield const_1.tc.extractTar(srcPath, slimPath);
extractedPath = yield const_1.tc.extractTar(srcPath, parentWorkspace);
}
}
catch (error) {
throw new Error(`Could not extract slim: ${error.message}`);
}
extractedPath = const_1.path.join(extractedPath, DIST);
const_1.core.debug('Caching slim...');
slimPath = yield const_1.tc.cacheDir(extractedPath, 'slim', VER, MACHINE);
}

View File

@ -88,7 +88,7 @@ async function get_slim() {
if (slimPath) {
core.notice(`slim ${VER} found in cache`)
} else {
slimPath = path.join(process.env.GITHUB_WORKSPACE, '../', 'slim')
const parentWorkspace = path.join(process.env.GITHUB_WORKSPACE, '../')
let srcPath
try {
@ -102,13 +102,14 @@ async function get_slim() {
try {
core.debug(`Extracting slim ${VER}...`)
if (EXT === 'zip') {
extractedPath = await tc.extractZip(srcPath, slimPath)
extractedPath = await tc.extractZip(srcPath, parentWorkspace)
} else { // tar.gz
extractedPath = await tc.extractTar(srcPath, slimPath)
extractedPath = await tc.extractTar(srcPath, parentWorkspace)
}
} catch (error) {
throw new Error(`Could not extract slim: ${error.message}`)
}
extractedPath = path.join(extractedPath, DIST)
core.debug('Caching slim...')
slimPath = await tc.cacheDir(extractedPath, 'slim', VER, MACHINE)