fix: Remove cd side effect when executing pio commands - #73
Conversation
|
Yeah, I think thats not cool either. I'll review and try your changes and merge it soon |
|
Thanks. On a related note, I'm also thinking about using |
|
@anurag3301 don't put directly to main mate, careful |
|
@dhupee yeah I wont, I am yet to test them out. But the recommendation makes sense, what do you think? |
Its good imo, coz I remember that the issue also happened to me once a while i just always forgot Either put to dev branch or i just use Kyufie's branch, in one or two days |
Right now, whenever the plugin wants to execute pio commands, cd is performed to move nvim to the project's root. This is not a good approach because it moves the current directory without the user's consent, which affects subsequent terminal spawns and most importantly, things like telescope search.
This change ensures pio commands executed do not affect the global current working directory. I've also improved the project root lookup function to not rely on hardcoded constants.