fix: use correct conan path

This commit is contained in:
2024-11-05 23:33:46 +13:00
parent 1e28f77086
commit f1b10b13b9
6 changed files with 36 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
import * as core from '@actions/core'
import * as util from './util'
import { download, getLatestVersion } from './download'
/**
@@ -14,7 +15,7 @@ export async function run(): Promise<void> {
}
const path = await download(conanVersion)
core.addPath(path)
core.addPath(path + util.getConanBinPath())
} catch (error) {
if (error instanceof Error) core.setFailed(error.message)
}

View File

@@ -28,3 +28,12 @@ export function getConanPlatform(): string {
return 'linux'
}
}
export function getConanBinPath(): string {
switch (process.platform) {
case 'win32':
return ''
default:
return '/bin'
}
}