Client should not overwrite exercise folders it does not "own"
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 363
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 2
Description
Ref: https://exercism-team.slack.com/archives/CARRG4MNC/p1565821395212500
**What I did / How to reproduce**
I wanted to complete Pangram (on the mentored track) but I hadn't progressed that far yet in JS mentored mode. So I:
- downloaded a students Pangram exercise
- copied the files into my `~/Exercism/javascript/pangram`
- removed their solution (so I could solve it)
- removed the .exercism folder (removed the association with the student)
Later when the pangram opened up to me I:
- `exercism download --exercise=pangram --track=javascript`
- the client proceeded to delete my completed `pangram.js`
- and replace it with the empty template from the exercise
---
What I was expecting to happen:
- The .exercism metadata to be created and my already solved solution to be IGNORED and _left in place_.
What we've discussed on the Slack:
- Perhaps if Exercism sees a folder that does not belong to it (has no .exercism file) it raises a hard error and refuses to touch the folder, requiring manual intervention.
- Someone suggested a `--force` option to tell the client to be forceful and proceed regardless
Then it would follow that the two cases that the Exercism client can muck with your filesystem:
- The exercise folder *does not already exist*
- The exercise folder does exist, but has an .exercism directory flagging it as "owned" by Exercism.
Contributor guide
Assessment
This issue has not been assessed yet.