Skip to content
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

Expose ghcup binary location #82

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fendor
Copy link

@fendor fendor commented May 10, 2024

Closes #81

Let the bikeshedding commence :)

Copy link
Member

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

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

Thanks!

We should verify that the -exe outputs are absolute paths indeed (otherwise we could name it ghcup-exe).

@@ -45,6 +45,8 @@ outputs:
description: 'The resolved version of stack'
ghc-exe:
description: 'The path of the ghc _executable_'
ghcup-command:
description: 'The path of the ghcup _executable_'
Copy link
Member

Choose a reason for hiding this comment

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

  • We should check whether the -exe outputs are indeed absolute paths.
  • The help text here should not say "path" but something like "The command to invoke ghcup (might not be an absolute path)".

Copy link
Author

Choose a reason for hiding this comment

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

We should check whether the -exe outputs are indeed absolute paths.

Any hints for writing a test? I don't see right away where such a test could be added.

Copy link
Member

Choose a reason for hiding this comment

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

Good question!

There is some code in CI that validates the -version outputs of the actions, maybe something similar could be done for the -exe outputs:

- name: Confirm resolved and installed versions match
shell: bash
run: |
CABALVER="$(cabal --numeric-version)"
GHCVER="$(ghc --numeric-version)"
echo "CABALVER=${CABALVER}" >> "${GITHUB_ENV}"
echo "GHCVER=${GHCVER}" >> "${GITHUB_ENV}"
if [[ "${{ steps.setup.outputs.ghc-version }}" == "latest-nightly" ]]
then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose GHCup binary location as action output
2 participants