conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6.24k stars 323 forks source link

Request to README.md: Command to delete the script? #537

Closed herry23xet closed 9 months ago

herry23xet commented 9 months ago

Comment:

So far:

Unix-like platforms (Mac OS & Linux)

Download the installer using curl or wget or your favorite program and run the script. For eg:

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh

or

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh

Wouldn't it be better to change it as follows so that the script (.sh) is also deleted after installation?

Unix-like platforms (Mac OS & Linux)

Download the installer using curl or wget or your favorite program and run the script. For eg:

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
rm -rf Miniforge3-$(uname)-$(uname -m).sh

or

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
rm -rf Miniforge3-$(uname)-$(uname -m).sh
hmaarrfk commented 9 months ago

i feel like cleanup is "advanced" and it is good to not delete things accidentally when giving users command to copy and paste.

what if we have a typo and end up deleting a whole tree for the user.

jakirkham commented 9 months ago

In any event deleting a script shouldn't need -r (and would not expect -f to be needed either)

hmaarrfk commented 9 months ago

yes. without the rf would make it much better. but it's a 50MB file.

I'm somewhat worried adding more instructions in this case makes things seem scarier than they are.

there is a simplicity to two lines of code.

herry23xet commented 9 months ago

It's fine for me and I understand now why! Feel free to close this here :)