Closed simonSlamka closed 3 years ago
Good day,
if I understand correctly, that means that the command wakatime
does not exist for you?
If that is the case, what would be the command to call a heartbeat instead?
In case it would be just an instance of "use this command instead of this one", it should not be hard to add it as an option to switch between those two, if necessary :)
Well, I have to call the executable directly: wakatime-cli.exe
. I've added the WakaTime dir to $PATH, so it works anywhere.
I'm going to try to do that, yeah. If it works, I would recommend adding it to the origin (your repo) so it doesn't happen to other people too.
Thanks for responding.
It is weird that this is happening.
The whole plugin was coded on windows 10 and I never encountered said issue, but I guess it can happen ^.^ I will add it to my 1.2 roadmap, as it is currently under development already :) Thank you :)
Have a great day!
Hold on. You possibly misunderstood what I meant originally. I already had the wakatime-cli before I got this plugin, since I am using it in other editors. I wanted to use that same binary in this plugin. That binary is called wakatime-cli.exe
.
Oh... well... Ill conduct further research regarding how it behaves and so on :) and if it is possible, I think it still would be nice to have both options ^.^
I'll open a PR if that's not a problem for you.
Sure, go on :)
I sadly can't look into it much today, but I promise to give it a thorough look tomorrow! ^.^
I'll try to write a workaround around cmd, as I don't think it's the most efficient way to do this. Please test the code before merging, more in the PR description. But the conditional itself works, so there's a problem of some sort afterwards.
using the wakatime command, you have to use cmd, there is no other way (at least I think) :)
however, using the cli directly, one should be able to use the system method to run the exe along with all the required arguments.
Also, I plan on adding a text field (much like with the api key) where you would paste the full path to the cli, so you wouldn't even have to have it in your $PATH :)
As I said before, I will look into it thoroughly tomorrow and try to improve the plugin :)
Thank you for your contribution! ^.^
@Pozitrone It's possible because I just did it, and it works. (technically system() also uses cmd.exe; what I meant was that you don't need to create a process for it manually and pass so many arguments - system() is enough)
Yeah, sure, please take a look whenever you're free and test it for yourself. Then please let me know, and I will make some additional changes. Afterward, we can merge.
@Pozitrone I see that you merged. Is everything working for you?
Through the whole development of 1.2.0, I was using purely the cli. Due to this, I believe this is now working.
Hi,
I am using WakaTime in many editors and IDEs. They have installed the official version to
~/.wakatime/wakatime-cli
Now, the executable name within that dir iswakatime-cli.exe
, not justwakatime
. This way the system cannot find the executable. Removing the extension, on the other hand, causes the executable to be unrunnable.I'm no Windows guru, so I don't really know what to do here. Tried making an alias, like I would do in Linux, but it doesn't work. Windows's "macros" are not very efficient and don't reportedly work in batch scripts.
Ideas?
Thanks