constructor icon indicating copy to clipboard operation
constructor copied to clipboard

Header script doesn't work when being piped or run with process substitution

Open bryant1410 opened this issue 2 years ago • 3 comments

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:

curl -fsSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | bash

And:

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

bryant1410 avatar May 08 '23 23:05 bryant1410

I think the intent here was to prevent source from being used. I am not sure if piping was supposed to be prevented too. Some might say it's a bad practice and it should be discouraged...

Pinging @conda/constructor for their opinion too.

jaimergp avatar May 11 '23 15:05 jaimergp

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include: - What OS and version you reproduced the issue on - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

github-actions[bot] avatar May 11 '24 04:05 github-actions[bot]

Hey, please don't let this issue die!

bryant1410 avatar May 13 '24 19:05 bryant1410