Skip to content

fix(nix): don't use /dev/tty in hash update actions#836

Merged
nekomeowww merged 2 commits into
moeru-ai:mainfrom
Weathercold:fix/hash-update-no-tty
Dec 28, 2025
Merged

fix(nix): don't use /dev/tty in hash update actions#836
nekomeowww merged 2 commits into
moeru-ai:mainfrom
Weathercold:fix/hash-update-no-tty

Conversation

@Weathercold
Copy link
Copy Markdown
Collaborator

It doesn't exist (anymore) in the environment of github actions

Description

Linked Issues

Additional Context

It doesn't exist (anymore) in the environment of github actions
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Weathercold, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical compatibility problem within GitHub Actions by modifying the Nix hash update scripts. Previously, these scripts relied on /dev/tty, which is not consistently available in the CI environment, leading to build failures. The updated scripts now use temporary files to capture the necessary build output, ensuring that hash extraction and updates proceed without interruption in the CI pipeline.

Highlights

  • Fix for GitHub Actions Compatibility: The pull request resolves an issue where the /dev/tty device is unavailable in GitHub Actions environments, causing hash update scripts to fail.
  • Refactored Hash Update Scripts: The update-assets-hash.sh and update-pnpm-deps-hash.sh scripts have been modified to capture nix build output into a temporary file instead of redirecting to /dev/tty.
  • Updated Hashes: The nix/assets-hash.txt and nix/pnpm-deps-hash.txt files have been updated with new hash values as a result of the script changes and rebuilds.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 27, 2025

⏳ Approval required for deploying to Cloudflare Workers (Preview) for stage-web.

Name Link
🔭 Waiting for approval For maintainers, approve here

Hey, @nekomeowww, @sumimakito, @luoling8192, @LemonNekoGH, kindly take some time to review and approve this deployment when you are available. Thank you! 🙏

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes an issue where the hash update scripts were using /dev/tty, which is not available in GitHub Actions environments. The fix replaces this with a temporary file to capture build output. While this solves the immediate problem, my review points out that this new approach introduces a resource leak by not cleaning up the temporary file, and also changes the format of the hash file by adding a newline, which is likely to break the Nix build. I've provided suggestions for both scripts to use a more robust and idiomatic shell pipeline that avoids temporary files and preserves the correct hash format.

Comment thread nix/update-assets-hash.sh
Comment thread nix/update-pnpm-deps-hash.sh
@nekomeowww nekomeowww merged commit 498eb0d into moeru-ai:main Dec 28, 2025
9 checks passed
@Weathercold Weathercold deleted the fix/hash-update-no-tty branch January 10, 2026 04:32
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.

2 participants