Skip to content

Test on ubuntu-24.04 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,18 @@ jobs:
# cabal update needed here since cabal-2.4 is still v1

# Test some old versions
- os: ubuntu-latest
- os: ubuntu-24.04
plan:
ghc: "8.2.2"
cabal: "2.4.1.0"
cabal_update: "false"

- os: ubuntu-24.04
plan:
ghc: "8.0.2"
cabal: "2.4.1.0"
cabal_update: "false"

# Test ghcup pre-release channel
- os: ubuntu-latest
ghcup_release_channel: "https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml"
Expand Down
5 changes: 3 additions & 2 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion lib/installer.js

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

11 changes: 9 additions & 2 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,16 @@ async function aptLibNCurses5(): Promise<boolean> {
`Installing libcurses5 and libtinfo5 using apt-get (for ghc < 8.3)`
);

// const returnCode = await exec(
// // `sudo -- sh -c "apt-get update && apt-get -y install libncurses5 libtinfo5"`
// `sudo -- sh -c "apt-get update && wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb && apt-get -y install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb"`
// );

const returnCode = await exec(
`sudo -- sh -c "apt-get update && apt-get -y install libncurses5 libtinfo5"`
// `sudo -- sh -c "apt-get update && apt-get -y install libncurses5 libtinfo5"`
`sudo -- sh -c "echo "deb http://security.ubuntu.com/ubuntu focal-security main universe" > /etc/apt/sources.list.d/ubuntu-focal-sources.list; apt-get update && apt-get -y install libncurses5 libtinfo5"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused about the quotation rules for strings:

sh -c "echo "deb...

Wouldn't the second " here close the string for sh?
Why is this ok?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a mistake because I manually edited the dist/index.js without husky, so the ts file is ignored.

I'll open a PR to fix it.

);

return returnCode === 0;
}

Expand Down Expand Up @@ -373,7 +380,7 @@ async function ghcup(
if (tool === 'cabal' && version === 'head') {
await ghcupCabalHead(os, bin);
} else {
const returnCode = await exec(bin, ['install', tool, version]);
const returnCode = await exec(bin, ['install', tool, version, '-v']);
if (returnCode === 0) await exec(bin, ['set', tool, version]);
}
}
Expand Down
Loading