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

Commit

Permalink
Re #202: choco install ghc --ignore-dependencies
Browse files Browse the repository at this point in the history
Following recipe given by @Mistuke in
#202 (comment) :
```
choco install chocolatey-core.extension
choco install ghc --ignore-dependencies
choco install cabal
```
  • Loading branch information
andreasabel committed Mar 13, 2023
1 parent 9a67e86 commit 3e01f31
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6 deletions.
20 changes: 18 additions & 2 deletions setup/dist/index.js

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

7 changes: 5 additions & 2 deletions setup/lib/installer.js

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

13 changes: 13 additions & 0 deletions setup/lib/setup-haskell.js

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

7 changes: 5 additions & 2 deletions setup/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,12 @@ async function choco(tool: Tool, version: string): Promise<void> {
tool,
'--version',
revision,
'-m',
// Andreas, 2023-03-13, issue #202:
// When installing GHC, skip automatic cabal installation.
tool == 'ghc' ? '--ignore-dependencies' : '',
// Verbosity options:
'--no-progress',
core.isDebug() ? '-d' : '-r'
core.isDebug() ? '--debug' : '--limit-output'
];
if ((await exec('powershell', args)) !== 0)
await exec('powershell', [...args, '--pre']);
Expand Down
14 changes: 14 additions & 0 deletions setup/src/setup-haskell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ export default async function run(
);
}

// Andreas, 2023-03-13, issue #202: Prepare choco.
// Since currently choco is the only install method for Windows,
// the following test is ok.
if (os == 'win32')
// choco install chocolatey-core.extension
await exec('powershell', [
'choco',
'install',
'chocolatey-core.extension',
// Verbosity options:
'--no-progress',
core.isDebug() ? '--debug' : '--limit-output'
]);

for (const [t, {resolved}] of Object.entries(opts).filter(
o => o[1].enable
)) {
Expand Down

0 comments on commit 3e01f31

Please sign in to comment.