From 30f91c79271ec813340dd35afc5fd38a42a40797 Mon Sep 17 00:00:00 2001 From: Jared Weakly Date: Wed, 25 Mar 2020 17:29:40 -0700 Subject: [PATCH] Add basic cabal setup steps --- dist/index.js | 12 ++++++++++++ src/setup-haskell.ts | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/dist/index.js b/dist/index.js index c2e8e84..5d28383 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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); diff --git a/src/setup-haskell.ts b/src/setup-haskell.ts index 2bad44a..0af7ec7 100644 --- a/src/setup-haskell.ts +++ b/src/setup-haskell.ts @@ -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); }