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

Fix package installation logic for the self-hosted runner environment #958

Merged
merged 2 commits into from
Mar 26, 2025

Conversation

smorimoto
Copy link
Member

@smorimoto smorimoto commented Mar 25, 2025

Signed-off-by: Sora Morimoto <sora@morimoto.io>
@smorimoto smorimoto added the bug Something isn't working label Mar 25, 2025
@smorimoto smorimoto requested a review from Copilot March 25, 2025 17:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refines the package installation logic by introducing distinct behavior for self-hosted and GitHub-hosted runners. Key changes include:

  • Adding a new constant (RUNNER_ENVIRONMENT) in constants.ts to differentiate between runner types.
  • Updating unix.ts to use RUNNER_ENVIRONMENT for conditional package installation and package index updates.
  • Refactoring conditional logic by replacing the old process.env.GITHUB_ACTIONS checks with the new runner environment checks.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/setup-ocaml/src/constants.ts Introduces RUNNER_ENVIRONMENT to support self-hosted and GitHub-hosted runner logic.
packages/setup-ocaml/src/unix.ts Refactors installation and update functions to execute based on the new runner environment.

Signed-off-by: Sora Morimoto <sora@morimoto.io>
@smorimoto smorimoto force-pushed the fix-install-logic-self-hosted branch from a32f872 to 60cd58a Compare March 26, 2025 03:04
@smorimoto smorimoto merged commit c33abba into master Mar 26, 2025
18 checks passed
@smorimoto smorimoto deleted the fix-install-logic-self-hosted branch March 26, 2025 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant