Closed CSDUMMI closed 5 years ago
Good find!
I think I fixed this with https://github.com/boxed/p/commit/3c8fd8e69d694582363fbc5bf3158454301b34fe and https://github.com/boxed/p/commit/2050a92a41cf778de5ba44b5733d9d5cfa560d81. I introduced a new function called get_paths(paths=[]), which takes a list of locations and if filters out all those, which do not exist. If paths is empty, get_paths returns a list of all existing locations in PATH. I didn't write a test for this yet, but p doesn't crash anymore.
I move many things into my PATH and forget to remove it, even if the location that points to has been deleted. So I executed p with a deleted location in PATH and I got:
So a corrupted
PATH
and you can't run p? I will try to implement a catch for this error and ignore a location, that doesn't exist.