Header script doesn't work when being piped or run with process substitution
- Dominant language
- Python
- Stars
- 497
- Forks
- 181
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 17
Description
### Checklist
- [X] I added a descriptive title
- [X] I searched open reports and couldn't find a duplicate
### What happened?
The script doesn't work when being piped or run with process substitution. This causes the following to fail:
```bash
curl -fsSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | bash
```
And:
```bash
bash <(curl -fsSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh)
```
The following lines cause the issue:
https://github.com/conda/constructor/blob/84995c8316a5399bc3dc2b67f64c92be71e9eb51/constructor/header.sh#L19-L22
### Conda Info
_No response_
### Conda Config
_No response_
### Conda list
_No response_
### Additional Context
Related to https://github.com/conda/conda/issues/12477
Contributor guide
Research direction
Start with constructor/header.sh at lines 19–22 and reproduce the failure using the piped curl and process-substitution commands in the report. Trace how those lines access the script when stdin or the script path is nonstandard, then verify that both invocation forms complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- release
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100