Skip to content

Running without a TTY causes --version / --help to fail #194

Open
@RossSmyth

Description

@RossSmyth

Hello, thanks for this neat project! I am attempting to build it in a sandboxed environment. This environemnt does not have a /dev/tty, but I would like to ensure that Edit compiled successfully by running edit --version. This currently fails because it attempts to open /dev/tty

STATE.stdin = check_int_return(libc::open(c"/dev/tty".as_ptr(), libc::O_RDONLY))?;

so the strace looks something like:

ioctl(0, TCGETS, 0x7fffffffd1b0)        = -1 ENOTTY (Inappropriate ioctl for device)
openat(AT_FDCWD, "/dev/tty", O_RDONLY)  = -1 ENXIO (No such device or address)
write(1, "Error 6: No such device or addre"..., 36) = 36
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-help-wantedWe encourage you to jump in on these!I-bugIt shouldn't be doing this.P-lowLow(er) priority. Example: Bugs in less commonly used features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions