-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[BUG] cloc won't work if ran through a symlink on Windows (ex Winget) : Can't locate PAR.pm in @INC
#849
Comments
I don't control the winget package for cloc but the config at https://github.com/microsoft/winget-pkgs/blob/master/manifests/a/AlDanial/Cloc/2.00/AlDanial.Cloc.installer.yaml looks fine. If you manually download the 2.00 exe from https://github.com/AlDanial/cloc/releases/download/v2.00/cloc-2.00.exe does that work properly for you? (The 2.02 release is also out; can get it from https://github.com/AlDanial/cloc/releases ) |
recreating a symlink with so ultimately I think that cloc can never be ran through a symlink |
Can't locate PAR.pm in @INC
Can't locate PAR.pm in @INC
Thanks for investigating the issue. However I'm wondering if the problem is associated with your environment rather than with cloc or its winget package? I did the installation myself, and cloc ran fine: PS C:\Users\al> winget install AlDanial.Cloc then opened a new PowerShell terminal and got the version number cleanly: PS C:\Users\al> cloc --version 2.00 Code counts work properly too. Do you have access to other Windows machines on which to try this? |
I've just tried use cloc for the first time and opted to |
23H2 too as stated in the original message |
Reproduced. Really weird with this error 😕 Console Logs in a single shell session
Reinstall
|
There's something happened. Outputs from 2 methods are different.
|
@EDM115 : I should have read your initial post more closely, re the OS version, thanks for the reminder. @Dragon1573 : is there a way to write the winget manifest for cloc without using a symlink? |
This is the designed feature of Maybe it's caused by Or create an install wizard (by InnoSetup, NullSoft, Burn, WiX, ...) for |
@AlDanial @Dragon1573 @danijam I think I fixed it, will open a PR |
fix: works when ran through a symlink, #849
@danijam I guess there was maybe an issue when rebuilding https://github.com/AlDanial/cloc/releases/download/v2.02/cloc-2.02-winget.exe |
I'm baffled since PR #850 is in the source I used to build |
hmmm… |
Good thinking, I hadn't tested that til now. I used the output of |
Describe the bug
When I tried to install cloc through winget, every command I run (even cloc --version) fails with the message :
Can't locate PAR.pm in @INC (you may need to install the PAR module) (@INC contains:) at -e line 592.
. Note that Strawberry Perl is installedcloc; OS; OS version
%LOCALAPPDATA%\Microsoft\WinGet\Packages\AlDanial.Cloc_Microsoft.Winget.Source_8wekyb3d8bbwe
with 2.02 from the releases tab but nothing changedTo Reproduce
Install through winget. Note that the npm package works just fine.
Expected result
cloc should work out of the box without any extra step
Additional context
I tried to install manually PAR and PAR::Packer for Perl, without any success. Restarting didn't changed a thing either
The text was updated successfully, but these errors were encountered: