Fix path construction error in windows
This commit is contained in:
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
ghc: ['8.8.3']
|
ghc: ['8.8.3', '8.4.4']
|
||||||
cabal: ['3.0.0.0']
|
cabal: ['3.0.0.0']
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
|
|||||||
4
dist/index.js
vendored
4
dist/index.js
vendored
@@ -8661,9 +8661,7 @@ async function installTool(tool, version) {
|
|||||||
const cmd = ['choco', 'install', tool, '--version', version];
|
const cmd = ['choco', 'install', tool, '--version', version];
|
||||||
const flags = ['-m', '--no-progress', '-r'];
|
const flags = ['-m', '--no-progress', '-r'];
|
||||||
await exec_1.exec('powershell', cmd.concat(flags));
|
await exec_1.exec('powershell', cmd.concat(flags));
|
||||||
const t = `${tool}.${version}`;
|
core.addPath(path_1.join(process.env.ChocolateyInstall || '', 'lib', `${tool}.${version}`, 'tools', `${tool}-${version}`, tool === 'ghc' ? 'bin' : ''));
|
||||||
const p = ['lib', t, 'tools', t, tool === 'ghc' ? 'bin' : ''];
|
|
||||||
core.addPath(path_1.join(process.env.ChocolateyInstall || '', ...p));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const ghcup = await tc.downloadTool('https://raw.githubusercontent.com/haskell/ghcup/master/ghcup');
|
const ghcup = await tc.downloadTool('https://raw.githubusercontent.com/haskell/ghcup/master/ghcup');
|
||||||
|
|||||||
@@ -135,9 +135,16 @@ async function installTool(tool: Tool, version: string): Promise<void> {
|
|||||||
const flags = ['-m', '--no-progress', '-r'];
|
const flags = ['-m', '--no-progress', '-r'];
|
||||||
await exec('powershell', cmd.concat(flags));
|
await exec('powershell', cmd.concat(flags));
|
||||||
|
|
||||||
const t = `${tool}.${version}`;
|
core.addPath(
|
||||||
const p = ['lib', t, 'tools', t, tool === 'ghc' ? 'bin' : ''];
|
join(
|
||||||
core.addPath(join(process.env.ChocolateyInstall || '', ...p));
|
process.env.ChocolateyInstall || '',
|
||||||
|
'lib',
|
||||||
|
`${tool}.${version}`,
|
||||||
|
'tools',
|
||||||
|
`${tool}-${version}`,
|
||||||
|
tool === 'ghc' ? 'bin' : ''
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
const ghcup = await tc.downloadTool(
|
const ghcup = await tc.downloadTool(
|
||||||
'https://raw.githubusercontent.com/haskell/ghcup/master/ghcup'
|
'https://raw.githubusercontent.com/haskell/ghcup/master/ghcup'
|
||||||
|
|||||||
Reference in New Issue
Block a user