SAFEHR-data / emap

Near real-time clinical database for research and innovation
2 stars 1 forks source link

`emap` script should be more careful not to overwrite existing data #25

Open jeremyestein opened 5 months ago

jeremyestein commented 5 months ago

In my root emap dir, I realised I had the old version of the hoover repo, so I renamed the dir to hoover.OLD and then ran emap setup --init.

Expected outcome: New hoover repo is cloned. Existing emap repo is detected by the script, and it skips over it, or issues some sort of warning or confirmation before doing anything.

Actual outcome: New hoover repo is cloned. emap directory is deleted and it re-cloned a new one.

Luckily I had pushed my branches before doing this, or I would have lost a couple of days of work. My IDE setup is gone, however.

jeremyestein commented 1 month ago

Reproduced in test method test_double_clone