felixrieseberg / vsc-ember-cli

:zap: Turn Visual Studio Code into an Ember Cli IDE
https://aka.ms/vsc-ember
MIT License
92 stars 15 forks source link

Use local Ember bin #35

Closed alexlafroscia closed 7 years ago

alexlafroscia commented 7 years ago

I'm not sure what the reason was (possibly due to using a Node version manager), but I ran into issues where the VSCode plugin didn't think I have Ember installed. Based on the assumption that every Ember app or add-on should have a version of the CLI installed in it's directory, we can use the app path to give the extension an exact path to the executable to run.

I tested this on my machine, and it cleared my issues right up. Instead of getting an error about the CLI not being installed, I not only get no error but the commands all seem to work.

alexlafroscia commented 7 years ago

I think might, sort-of be related to #16? I too ran into issues while using a Node version manager, but this seems to fix things. However, when running the command directly like this, I don't know which version of Node it is actually using...

At the very least, pointing to the project's ember bin shouldn't break anyone using a normal Node installation.

t-sauer commented 7 years ago

Have you tried ember new/init? For those two commands you don't have a local ember version yet. Maybe it should check for a local Ember version first and if it doesn't find one fall back to a global installation.

alexlafroscia commented 7 years ago

No I didn't try those commands. Very good point, falling back it a good idea. I guess it would just return the string ember if it can't find it locally, right?

felixrieseberg commented 7 years ago

Nice contribution, thank you very much! @t-sauer has a point though - I don't think it'll return the right thing, but I'm happy to just add that in.

alexlafroscia commented 7 years ago

Perfect! Exactly that I was going to add myself.

felixrieseberg commented 7 years ago

Again, thanks! As you probably saw, it's already out 💯

alexlafroscia commented 7 years ago

Yeah, I just re-installed it but the extension marketplace is showing 0.3.1 as the latest. It is supposed to just pick up the new release from Github, or does an explicit new version have to be pushed up there?

felixrieseberg commented 7 years ago

Hmmm, might be stuck in cashing or something? Should be out there (I just installed it)

alexlafroscia commented 7 years ago

Yeah, it's all good now. Thanks for the quick turn-around on this!