-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ag doesn't work correctly through wrapper #76
Comments
@cbilson Can you try the following for me?
|
There are other parameters you can pass to shimgen generated executables as well - chocolatey-archive/chocolatey#509 |
@cbilson Actually, what version of chocolatey are you using? There was an issue in some earlier releases (0.9.8.24-.26) with shimgen stuff that has been resolved in the more recent version. FYI, I installed ag and then in powershell:
On cmd.exe I get the following:
It seems like there may be an issue here. |
This actually only happens on my work computer, which uses an "official" company version of chocolatey: PS1> choco -v I tried using ag from this machine and adding the --shimgen-log argument, but it looks like maybe that's ignored or passed on to ag? PS1> C:\Chocolatey\bin\ag.exe --shimgen-log 'foo bar' Usage: ag [OPTIONS] PATTERN [PATH] Recursively search for PATTERN in PATH. Example: Output Options: Last night I verified that there is no problem on the newer version of chocolatey that my laptop has. Date: Thu, 4 Sep 2014 15:58:43 -0700 @cbilson Actually, what version of chocolatey are you using? There was an issue in some earlier releases (0.9.8.24-.26) with shimgen stuff that has been resolved in the more recent version. FYI, I installed ag and then in powershell: ag --shimgen-log 'The Silver Searcher' C:\codelocal\chocolatey.org >ag --shimgen-log 'The Silver Searcher' [shim]: Arguments are '"The Silver Searcher"' [shim]: Exiting with '0'. On cmd.exe I get the following: C:\codelocal\chocolatey.org>ag --shimgen-log 'The Silver Searcher' ERR: Error opening directory Silver: No such file or directory It seems like there may be an issue here. — |
It could be the older batch redirect (creates a .bat and a no extension format), depending on what you were using (bash, cmd, or powershell) has issues where the newer shimgen one (which creates an exe shim) does not. The shimgen was first introduced in 0.9.8.24. |
Shimgen args would only be available when the shimgen is being used (0.9.8.24+). |
At this point I'd almost want to mark this as a non-issue since it affects older versions of chocolatey and is fixed in newer versions. Would you agree @cbilson ? |
At some point in the past year or so, Chocolatey was changed to generate wrapper exe's for tools. So, for example, when I install the ag package, I get a little ag.exe in $env:ChocolateyInstall\bin, which is in my path. This wrapper exe just spawns the real tool in $env:Chocolatey\lib\ag.v\tools.
If I say
ag 'The Silver Searcher'
using the wrapper, I get errors:If I say the same thing to the lib\ag.v\tools version of ag.exe, it works fine.
I am pretty sure this is due to the wrapper exe. I don't know if there is a way to tell chocolatey you don't want a wrapper exe, or much of anything else about the details of why this happens. I remember running into this with a package I tried to build and abandoned.
If I get some time I might look into this. If I find anything, I will update this. I just wanted to make you aware of the problem and maybe if anyone else finds it, they won't think they are crazy like I did for about 20 minutes.
The text was updated successfully, but these errors were encountered: