Skip to content

cli: replace libc::isatty() with cross-platform TTY detection #5

@MasonStation

Description

@MasonStation

phantom reveal uses libc::isatty() to guard against piping secrets into non-interactive contexts. libc is Unix-only.

Location

  • phantom-cli/src/commands/reveal.rs:23-26

Fix

Use std::io::IsTerminal (stable since Rust 1.70) — no new dependency needed:

use std::io::IsTerminal;
if !std::io::stdout().is_terminal() { /* ... */ }

Severity

Blocker — will not compile on Windows.

Tracker: #1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwindowsWindows platform support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions