ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.21k stars 1.41k forks source link

grep installs, but dependency file does not, so grep is not functional #2384

Closed pccasto closed 2 years ago

pccasto commented 6 years ago

installing grep causes a download of both: grep-2.5.4-bin.zip and grep-2.5.4-dep.zip. But it only extracts the bin.zip, and doesn't extract the dep.zip

Because of this, when trying to run grep, there are pop-ups alerting to error with missing pcre3 and regex2.

Unzipping the .dll files from the dep.zip file to the grep/2.5.4/bin directory in the scoop tree provides a work-around/local solution.

~paul

r15ch13 commented 6 years ago

Please run scoop update and try again. This problem was fixed recently.

pccasto commented 6 years ago

Hi Richard,

Thanks for the quick response. Didn't even think of trying that, since I just install scoop 2 days ago. I did check for bugs around this area, before reporting, but my search was too narrow. I'm guessing that this was a symptom of the robocopy file handling issue.

Did the: scoop upgrade; scoop uninstall grep; scoop install grep With that the install showed the extraction of both files.

However, along the way I ran into one that was already reported, and marked as closed: https://github.com/lukesampson/scoop/issues/1935: C:\Users\paul>scoop update Updating Scoop... Scoop was updated successfully! 'itcode"' is not recognized as an internal or external command, operable program or batch file.

So, it claimed a successful update, but then threw an error/warning. For those of us who generally stick with cmd, a) should we go to powershell anytime we are running scoop? in which case should scoop error out immediately if it detects the environment is cmd? or b) if scoop is allowed to be run within cmd, should this sort of error/warning be handled? [Note - my initial install of scoop did use powershell]

Thanks again, ~paul

rasa commented 6 years ago

@r15ch13 is there a way to turn on debugging to determine what’s causing the

'itcode"' is not recognized as an internal or external command, operable program or batch file.

errors?

That single “ char is very suspicious.

r15ch13 commented 6 years ago

Unfortunately, I couldn't figure out what causes this error. AppVeyor drove me crazy the day I worked on my project. @pccasto you may be the only one who can debug this :grin: I was not able to reproduce it. Does it happen everytime you run scoop update?

pccasto commented 6 years ago

No. It does not happen now.

This could have to do with a configuration issue stemming from the original install (although I believe I followed the install instructions precisely). These were some additional symptoms / observations:

So potential root cause path is new install in powershell, followed by some activity installing apps in cmd, followed by scoop upgrade in cmd.

Seems to be a one-time spurious warning, as all seems to be working.

~paul

kenorb commented 6 years ago

As per this comment, as for workaround, installing the package via PS removed itcode error, e.g.

- ps: scoop install shellcheck

Related:

pccasto commented 6 years ago

Thanks @kenorb. The error with the inability to find/run 'itcode' has now disappeared from my system. In my case it was a transient error between an install of an early July version, and an upgrade shortly thereafter.

I think this issue can be closed out, as the original problem had an identified root cause that was a bug corrected by the changes on 10 July.

kenorb commented 6 years ago

The problem is still there using the latest version of scoop, only when the install command isn't executed in PowerShell.

Here is the demo build.

scoop install shellcheck
Updating Scoop...
Scoop was updated successfully!
Installing 'shellcheck' (0.5.0) [64bit]
Downloading https://shellcheck.storage.googleapis.com/shellcheck-v0.5.0.zip (6.1 MB)...
Checking hash of shellcheck-v0.5.0.zip... ok.
Extracting... done.
Running pre-install script...
Linking ~\scoop\apps\shellcheck\current => ~\scoop\apps\shellcheck\0.5.0
Creating shim for 'shellcheck'.
'shellcheck' (0.5.0) was installed successfully!
'itcode"' is not recognized as an internal or external command,
operable program or batch file.
Command exited with code 1
pccasto commented 6 years ago

I my case I had run the original install in powershell (in Windows 10).
It was on the scoop upgrade that I ran in cmd - and that's when the 'itcode' errror appeared. Subsequent scoop install <pkgx> being run in the cmd shell have not displayed that error on my system. I didn't mean to imply that the problem with 'itcode' has been resolved - just was indicating that I'm not able to help troubleshoot it, based on my system state.

I'm OK with this issue being re-titled to focus on the 'itcode' aspect of the problem, rather than the 'grep/multi-package' aspect. Or a new issue can be created. I was just trying to make sure the maintainers weren't caught with trying to solve two different problems under one issue.

robeady commented 4 years ago

I just encountered the same issue. I ran scoop install yarn from cmd and it succeeded, but printed at the end

'itcode"' is not recognized as an internal or external command,
operable program or batch file.

I scouted around the codebase trying to figure out how on earth this might happen. My theory is that an 'exitcode' string is being chopped up somehow. The most suspicious piece of code I could find is:

https://github.com/lukesampson/scoop/blob/a9fa775d59b14e7dce335313faa0eff855469764/lib/core.ps1#L602

I have no clue what this is doing precisely, but with all the string substitution it looks like the most obvious candidate. Anyone have an idea of how to investigate this further?

gpetrov commented 3 years ago

getting the same: 'itcode"' is not recognized as an internal or external command, operable program or batch file.

when running scoop update from a cmd and not from powershell

it does update all fine btw