Closed dantecatalfamo closed 3 years ago
Looks good to me. Don't see any reason not to have better error messages.
I'm curious though, did you run in to a situation where platformio-mode was enabled when it shouldn't?
It's been a while now, but looking through everything it seems that platformio-conditionally-enable
should prevent this.
I found that projectile-verify-file
will check for a file in the current directory even if it's not a "project". You can end up in a situation where platformio.ini
exists in your current directory so platformio-mode
gets enabled, but projectile-project-root
still returns nil
, resulting in an error whenever you try to run a command.
It's not likely to happen since you don't edit c++ files in the root of a PlatformIO, but who knows ¯_(ツ)_/¯.
I found the error when I enabled platformio-mode
manually in a PlatformIO project I thought was version controlled and I had no idea what was going wrong when I got the stringp
error haha
Currently if users aren't in a projectile project and try to run a platformio command, they receive a cryptic error about an argument not being
stringp
.Instead now they will get a more helpful message telling them they're not in a projectile project.