Can't access vcpkg cmdlet unless I'm inside the repo folder.
Steps to reproduce:
Bug:
Command not found. (see error message below)(this was with powershell)
vcpkg : The term 'vcpkg' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ vcpkg install devil enet glew sdl2
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (vcpkg:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Expected:
The installation of the library should succeed.
And what happens if you have two repositories with vcpkg?
At the moment I've cloned this vcpkg repository, and I've another one that's my fork. Since I run bootstrap often in order to check issues, what should it do? Add the path every time? Check every path in %PATH% see if vcpkg is in them and update it? How it manages more repositories?
And more, what's the scope of using vcpkg outside its folder?
I don't like to pollute %PATH%, so in my opinion it shouldn't be added automatically. You can change %PATH% environment variable by yourself. In my opinion is the simplest solution.
Well it should only do it for production code and not for development code, but that restricts a lot the use of vcpkg to people that like to handle things in details not for the others that don't want to bother with those.
@jepessen I think it is good when we call integrate command, I think in integration command we need to add vcpkg to global system path.
Add vcpkg.exe to system path when running .bootstrap-vcpkg.bat
Or you know, you could just use the full path...
Alternatively, an alias can be written in the profile file. Like what the Integrate command does. This is how I "fixed" it.
Most helpful comment
@jepessen I think it is good when we call integrate command, I think in integration command we need to add vcpkg to global system path.