Add basic cabal setup steps

This commit is contained in:
Jared Weakly
2020-03-25 17:29:40 -07:00
parent 8154472447
commit 30f91c7927
2 changed files with 25 additions and 0 deletions

12
dist/index.js vendored
View File

@@ -6954,6 +6954,18 @@ const exec_1 = __webpack_require__(986);
await exec_1.exec('stack', ['setup', opts.ghc.version]);
core.endGroup();
}
if (opts.cabal.enable) {
core.startGroup('Setting up cabal');
await exec_1.exec('cabal', [
'user-config',
'update',
'-a',
'http-transport: plain-http',
'-v3'
]);
await exec_1.exec('cabal', ['update']);
core.endGroup();
}
}
catch (error) {
core.setFailed(error.message);

View File

@@ -20,6 +20,19 @@ import {exec} from '@actions/exec';
await exec('stack', ['setup', opts.ghc.version]);
core.endGroup();
}
if (opts.cabal.enable) {
core.startGroup('Setting up cabal');
await exec('cabal', [
'user-config',
'update',
'-a',
'http-transport: plain-http',
'-v3'
]);
await exec('cabal', ['update']);
core.endGroup();
}
} catch (error) {
core.setFailed(error.message);
}