diff --git a/dist/index.js b/dist/index.js index 3453c6e..fd260c5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35575,10 +35575,10 @@ function parseURL(name, val) { } function getOpts({ ghc, cabal, stack }, os, inputs) { core.debug(`Inputs are: ${JSON.stringify(inputs)}`); - const stackNoGlobal = (inputs['stack-no-global'] || '') !== ''; - const stackSetupGhc = (inputs['stack-setup-ghc'] || '') !== ''; - const stackEnable = (inputs['enable-stack'] || '') !== ''; - const matcherDisable = (inputs['disable-matcher'] || '') !== ''; + const stackNoGlobal = parseYAMLBoolean('stack-no-global', inputs['stack-no-global'] || 'false'); + const stackSetupGhc = parseYAMLBoolean('stack-setup-ghc', inputs['stack-setup-ghc'] || 'false'); + const stackEnable = parseYAMLBoolean('enable-stack', inputs['enable-stack'] || 'false'); + const matcherDisable = parseYAMLBoolean('disable-matcher', inputs['disable-matcher'] || 'false'); const ghcupReleaseChannel = parseURL('ghcup-release-channel', inputs['ghcup-release-channel'] || ''); // Andreas, 2023-01-05, issue #29: // 'cabal-update' has a default value, so we should get a proper boolean always. @@ -37753,7 +37753,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"win32":{"ghc":[{"from":"9.4.3","to": /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"ghc":["9.14.1","9.12.4","9.12.2","9.12.1","9.10.3","9.10.2","9.10.1","9.8.4","9.8.2","9.8.1","9.6.7","9.6.6","9.6.5","9.6.4","9.6.3","9.6.2","9.6.1","9.4.8","9.4.7","9.4.6","9.4.5","9.4.4","9.4.3","9.4.2","9.4.1","9.2.8","9.2.7","9.2.6","9.2.5","9.2.4","9.2.3","9.2.2","9.2.1","9.0.2","9.0.1","8.10.7","8.10.6","8.10.5","8.10.4","8.10.3","8.10.2","8.10.1","8.8.4","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.16.1.0","3.16.0.0","3.14.2.0","3.14.1.1","3.14.1.0","3.12.1.0","3.10.3.0","3.10.2.1","3.10.2.0","3.10.1.0","3.8.1.0","3.6.2.0","3.6.0.0","3.4.1.0","3.4.0.0","3.2.0.0","3.0.0.0","2.4.1.0"],"stack":["3.9.3","3.9.1","3.7.1","3.5.1","3.3.1","3.1.1","2.15.7","2.15.5","2.15.3","2.15.1","2.13.1","2.11.1","2.9.3","2.9.1","2.7.5","2.7.3","2.7.1","2.5.1","2.3.3","2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"],"ghcup":["0.1.50.2"]}'); +module.exports = /*#__PURE__*/JSON.parse('{"ghc":["9.14.1","9.12.4","9.12.2","9.12.1","9.10.3","9.10.2","9.10.1","9.8.4","9.8.2","9.8.1","9.6.7","9.6.6","9.6.5","9.6.4","9.6.3","9.6.2","9.6.1","9.4.8","9.4.7","9.4.6","9.4.5","9.4.4","9.4.3","9.4.2","9.4.1","9.2.8","9.2.7","9.2.6","9.2.5","9.2.4","9.2.3","9.2.2","9.2.1","9.0.2","9.0.1","8.10.7","8.10.6","8.10.5","8.10.4","8.10.3","8.10.2","8.10.1","8.8.4","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.16.1.0","3.16.0.0","3.14.2.0","3.14.1.1","3.14.1.0","3.12.1.0","3.10.3.0","3.10.2.1","3.10.2.0","3.10.1.0","3.8.1.0","3.6.2.0","3.6.0.0","3.4.1.0","3.4.0.0","3.2.0.0","3.0.0.0","2.4.1.0"],"stack":["3.9.3","3.9.1","3.7.1","3.5.1","3.3.1","3.1.1","2.15.7","2.15.5","2.15.3","2.15.1","2.13.1","2.11.1","2.9.3","2.9.1","2.7.5","2.7.3","2.7.1","2.5.1","2.3.3","2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"],"ghcup":["0.2.6.2"]}'); /***/ }) diff --git a/lib/opts.js b/lib/opts.js index 98c5be9..1aa070f 100644 --- a/lib/opts.js +++ b/lib/opts.js @@ -147,10 +147,10 @@ function parseURL(name, val) { } function getOpts({ ghc, cabal, stack }, os, inputs) { core.debug(`Inputs are: ${JSON.stringify(inputs)}`); - const stackNoGlobal = (inputs['stack-no-global'] || '') !== ''; - const stackSetupGhc = (inputs['stack-setup-ghc'] || '') !== ''; - const stackEnable = (inputs['enable-stack'] || '') !== ''; - const matcherDisable = (inputs['disable-matcher'] || '') !== ''; + const stackNoGlobal = parseYAMLBoolean('stack-no-global', inputs['stack-no-global'] || 'false'); + const stackSetupGhc = parseYAMLBoolean('stack-setup-ghc', inputs['stack-setup-ghc'] || 'false'); + const stackEnable = parseYAMLBoolean('enable-stack', inputs['enable-stack'] || 'false'); + const matcherDisable = parseYAMLBoolean('disable-matcher', inputs['disable-matcher'] || 'false'); const ghcupReleaseChannel = parseURL('ghcup-release-channel', inputs['ghcup-release-channel'] || ''); // Andreas, 2023-01-05, issue #29: // 'cabal-update' has a default value, so we should get a proper boolean always. diff --git a/lib/versions.json b/lib/versions.json index 5369d04..970010f 100644 --- a/lib/versions.json +++ b/lib/versions.json @@ -115,5 +115,5 @@ "1.3.0", "1.2.0" ], - "ghcup": ["0.1.50.2"] + "ghcup": ["0.2.6.2"] } diff --git a/src/opts.ts b/src/opts.ts index 8a0776f..7d43683 100644 --- a/src/opts.ts +++ b/src/opts.ts @@ -154,10 +154,22 @@ export function getOpts( inputs: Record ): Options { core.debug(`Inputs are: ${JSON.stringify(inputs)}`); - const stackNoGlobal = (inputs['stack-no-global'] || '') !== ''; - const stackSetupGhc = (inputs['stack-setup-ghc'] || '') !== ''; - const stackEnable = (inputs['enable-stack'] || '') !== ''; - const matcherDisable = (inputs['disable-matcher'] || '') !== ''; + const stackNoGlobal = parseYAMLBoolean( + 'stack-no-global', + inputs['stack-no-global'] || 'false' + ); + const stackSetupGhc = parseYAMLBoolean( + 'stack-setup-ghc', + inputs['stack-setup-ghc'] || 'false' + ); + const stackEnable = parseYAMLBoolean( + 'enable-stack', + inputs['enable-stack'] || 'false' + ); + const matcherDisable = parseYAMLBoolean( + 'disable-matcher', + inputs['disable-matcher'] || 'false' + ); const ghcupReleaseChannel = parseURL( 'ghcup-release-channel', inputs['ghcup-release-channel'] || '' diff --git a/src/versions.json b/src/versions.json index 66a32cc..49ba3fa 100644 --- a/src/versions.json +++ b/src/versions.json @@ -115,5 +115,5 @@ "1.3.0", "1.2.0" ], - "ghcup": ["0.1.50.2"] + "ghcup": ["0.2.6.2"] }