phpenv-installer icon indicating copy to clipboard operation
phpenv-installer copied to clipboard

Issue with curl command

Open sebabratakundu opened this issue 2 years ago • 8 comments

The curl command removes all of my stuff which are inside my user directory. It's a nightmare. All my appdatas are gone now.

curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer \ | bash

OS- windows 10

sebabratakundu avatar Feb 16 '23 17:02 sebabratakundu

By the looks of it this script is intended as an installer and not an updater. What were your intentions for running the script again and what would you rather it does instead of reinstalling everything?

nickl- avatar Feb 20 '23 02:02 nickl-

@nickl- I am new to this. I was trying to setup phpenv in my sys using this cmd. cause it's mentioned in the doc of phpenv for auto installation.

sebabratakundu avatar Feb 20 '23 05:02 sebabratakundu

It shouldn't remove everything in your home directory, that is not good.

nickl- avatar Apr 01 '23 12:04 nickl-

@sebabratakundu I just had a look at the script's code and there is nothing in there that would do that so I have to assume something else caused the loss of data unfortunately.

debo avatar Jun 21 '23 13:06 debo

@sebabratakundu I just had a look at the script's code and there is nothing in there that would do that so I have to assume something else caused the loss of data unfortunately.

@debo , It might be caused by powershell or cmd. But it happened when I ran the command.

sebabratakundu avatar Jun 21 '23 14:06 sebabratakundu

@sebabratakundu in which case I would definitely exclude the script at all. My Windows knowledge is surely outdated but being phpenv-installer a bash script and it cannot run in Powershell or Cmd. It can work only inside WSL on a Windows machine as far as I know.

This mean than none of the code in the script was executed on your machine.

debo avatar Jun 21 '23 14:06 debo

@sebabratakundu in which case I would definitely exclude the script at all. My Windows knowledge is surely outdated but being phpenv-installer a bash script and it cannot run in Powershell or Cmd. It can work only inside WSL on a Windows machine as far as I know.

This mean than none of the code in the script was executed on your machine.

@debo, actually it's been a while. I forgot in which cli I ran this command.

sebabratakundu avatar Jun 21 '23 14:06 sebabratakundu

@sebabratakundu I appreciate that and please accept my apologies for the late reply also.

Sadly, technically speaking, there genuinely nothing in the script itself that could have caused the deletion. I do acknowledge it happened when you ran it but I would say it's purely coincidental I'm afraid.

debo avatar Jun 21 '23 14:06 debo