Skip to content

fix(env): finish env set --stdin on Enter at a terminal - #444

Merged
pdonohoe02 merged 1 commit into
mainfrom
claude/project-thread-1nmisk
Nov 25, 2026
Merged

pdonohoe02 merged 1 commit into
mainfrom
claude/project-thread-1nmisk

Conversation

@pdonohoe02

Copy link
Copy Markdown
Contributor

Requested by Patrick · project thread

Summary

  • floo env set KEY --stdin typed at a terminal showed no prompt and waited for Ctrl-D. It now prompts Value for KEY (hidden, Enter to finish):, hides input, and finishes on Enter.
  • Piped input is unchanged: read to EOF, one trailing newline stripped, so multi-line values still work.
  • An empty value at the prompt is refused instead of setting an empty secret.

Issue Closure (Required)

N/A: reported directly in the project thread, no issue filed.

Changes

  • src/commands/env.rs: read_stdin_value uses rpassword::prompt_password when stdin is a TTY (prompt goes to the TTY, so --json stdout stays clean).
  • src/cli.rs: --stdin help describes both modes.
  • Cargo.toml / Cargo.lock: add rpassword 7 (hidden input on Unix and Windows; pulls rtoolbox and moves the lock to one windows-sys 0.61).
  • Docs: getfloo/floo-docs PR on the same branch updates cli/env.mdx.

Test Plan

  • ./scripts/test (fmt, clippy, all tests) passes
  • Manual PTY run against a stub API: pasting supersecret + Enter sent {"key":"MY_KEY","value":"supersecret"} with nothing echoed; bare Enter exits 1 with "No value entered for MY_KEY."
  • Existing piped --stdin tests still pass

Discovered Issues

None


Generated by Claude Code

At a terminal, --stdin now prompts for the value with input hidden and
finishes on Enter, instead of silently waiting for Ctrl-D. Piped input is
still read to EOF with one trailing newline stripped. An empty value at
the prompt is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eufw46cH1f3ZTMLXZg65Vr
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T16:39:37.254017Z ee72931 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pdonohoe02 pdonohoe02 self-assigned this Nov 25, 2026
@pdonohoe02
pdonohoe02 merged commit 6d006cf into main Nov 25, 2026
7 checks passed
@pdonohoe02
pdonohoe02 deleted the claude/project-thread-1nmisk branch November 25, 2026 16:45
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