exercism / cli

A Go based command line tool for exercism.org.
https://exercism.org/docs/using/solving-exercises/working-locally
MIT License
1.33k stars 359 forks source link

Replaced default path when using --workspace #780

Open dardub opened 5 years ago

dardub commented 5 years ago

I haven't used exercism in a while and just updated to 3.0.11. In the process. I used the --workspace flag, but it ignored the path I gave and replaced the default (existing) path.

Steps taken:

  1. exercism configure --token=<TOKEN> Result:
    The default Exercism workspace is ~/Exercism
    There is already something there.
         ...
    You can choose the workspace location by rerunning this command
    with the --workspace flag.
  2. exercism configure --token=<TOKEN> --workspace=~/Exercism/Reboot/ Result:
    
    You have configured the Exercism command-line client:

Config dir: ~/.config/exercism Token: (-t, --token) Workspace: (-w, --workspace) ~/Exercism/Reboot API Base URL: (-a, --api) https://api.exercism.io/v1



However, `~/Exercism/Reboot` does not exist.  The existing directory `~/Exercism` is now an empty directory `~/exercism`.
dardub commented 5 years ago

I just downloaded my first exercise and now the directory ~/exercism/Reboot/ exists. But of course my existing projects in ~/Exercism are still gone.

My guess is because I tried to add the workspace as a subdirectory inside the default workspace?

kytrinyx commented 5 years ago

@dardub This does sound like a bug, and I'm mortified that you lost everything you had in ~/Exercism.

I'll see if I can figure out exactly what is going on here.

f1rstmehul commented 3 years ago

@kytrinyx Did reproduced it? I reproduced it on Windows 10 and Ubuntu 20.04 LTS. I haven't lost any files.