JEnv-for-Windows icon indicating copy to clipboard operation
JEnv-for-Windows copied to clipboard

maybe add command to clean invalid *name-path* in `jenv.config.json`

Open potoo0 opened this issue 4 years ago • 4 comments

sometimes there are temp folder set jdk version, and after that we need to clean up those invaild name-path config.

potoo0 avatar Apr 09 '22 10:04 potoo0

Sorry I dont get what you mean? Can you maybe add an example of how the config looks before and what you expect it to look like after running the command

FelixSelter avatar Apr 09 '22 12:04 FelixSelter

The known jenv.config.json content is

{
  "jenvs":[...],
  "locals":[
    {
      "path":"E:\\test_jshell",
      "name":"jdk17"
    },
    {
      "path":"E:\\test_jshell\\build\\libs",
      "name":"jdk17"
    },
    {
      "path":"E:\\test_jshell\\build\\libs\\Template",
      "name":"jdk17"
    }
  ],
  "global":"D:\\Java\\jdk1.8.0_261"
}

Those name-path in locals will not vaild , after I delete E:\test_jshell folder. I expect there was a command to clear those.

potoo0 avatar Apr 09 '22 14:04 potoo0

well you can just go into the folder and type jenv local remove before you delete it?
Im not exactly sure why we would need an additional feature?
Tell me if that solved your problem or i will implement it so it checks at every run if folders got deleted

FelixSelter avatar Apr 09 '22 17:04 FelixSelter

?

FelixSelter avatar Apr 11 '22 17:04 FelixSelter