casey / casey/just

`just` auto-aborts interactive confirmation when reading justfile from `/dev/stdin`

Open
#2,698 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

Hi there,

I not entirely sure if this is a bug or something with my terminal/shell. It seems that just auto-aborts the interactive confirmation dialogue if the justfile is read from `/dev/stdin`.

Software used:

- terminal: ghostty
- shell: fish
- just version: 1.40.0

I also see this behavior in bash.

**Steps to reproduce:**

1. minimal justfile with `confirm` attribute:
```justfile
[confirm]
default:
echo 'Hello, world!'
```
2. read justfile from stdin:
```bash
cat justfile | just -d . -f /dev/stdin
```

**Expected behaviour:**

just waits for my interactive confirmation.

**Actual behaviour:**

just auto-aborts the recipe.

![Image](https://github.com/user-attachments/assets/ac88c9e7-01d8-4447-88d2-b97f3d41ff90)

edit: same behavior in different terminal with bash

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the minimal justfile and `cat justfile | just -d . -f /dev/stdin`, first comparing the interactive confirmation path with a normally read justfile. Verify the fix by confirming that `/dev/stdin` waits for input instead of auto-aborting, and repeat the check in bash and fish.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, fish, rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.