Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Default value for 'cabal-update'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Jan 6, 2023
1 parent fc8d3e4 commit 68839e4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 4 additions & 2 deletions setup/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions setup/lib/opts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions setup/src/opts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@ export function getOpts(
const stackEnable = (inputs['enable-stack'] || '') !== '';
const matcherDisable = (inputs['disable-matcher'] || '') !== '';
// Andreas, 2023-01-05, issue #29:
// 'cabal-update' has a default value, so we should get a proper boolean always. (Fingers crossed.)
const cabalUpdate = parseYAMLBoolean('cabal-update', inputs['cabal-update']);
// 'cabal-update' has a default value, so we should get a proper boolean always.
// Andreas, 2023-01-06: This is not true if we use the action as a library.
// Thus, need to patch with default value here.
const cabalUpdate = parseYAMLBoolean(
'cabal-update',
inputs['cabal-update'] || 'true'
);
core.debug(`${stackNoGlobal}/${stackSetupGhc}/${stackEnable}`);
const verInpt = {
ghc: inputs['ghc-version'] || ghc.version,
Expand Down

0 comments on commit 68839e4

Please sign in to comment.