-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
scancode does not start on windows exec #1129
Comments
@jeffmcaffer I do not know if node honours Windows junctions or not: it could be also that node may be less tested on Windows than POSIX Now the reason why ScanCode generates a junction on first use (e.g. on the initial These (the Scripts and the bin/junctions) are created either:
Can you point me to where in ClearlyDefined this happens? Was this on the first run? or on other runs? |
Thanks @pombredanne. this is all runs of a freshly installed 2.9.2 (was also happening on 2.9.1). This happens in ClearlyDefined if you setup the crawler. If you unzip scancode in c:\installs (default) and run, then queue a request by POSTing something like
That will trigger the crawler to get the npm and its source iteratively and run scancode (and other tools). See https://github.com/clearlydefined/crawler/blob/master/providers/process/scancode.js#L71 for details of the exec call in node. Stepping back from the how/why, Is it possible to have the init code just make a copy or rename of Scripts to bin when setting up on Windows? I get that a symlink is easier but it has these problems. |
The Python tools expect things on Windows to be under Now one way could be to still have a junction as a convenience but not use it in the root "scancode" script and reference |
@jeffmcaffer one thing that I do not understand is why would any of this matters to node.js? if it is failing then this means that the junction was not created in the first place possibly. Do you have a more complete failure/stack trace log of sorts? |
I don't know either but it just fails trying to run .../bin/scancode.exe. It is not a stack trace per se, just the exec gets an error. Are you able to reproduce? I'll see if anyone in the hackathon today can repo. |
This hass likely little or no impact Signed-off-by: Philippe Ombredanne <[email protected]>
This hass likely little or no impact Signed-off-by: Philippe Ombredanne <[email protected]>
Use Scripts dir rather than bin junction #1129
@jeffmcaffer the latest develop branch and tag 2.9.7 should have this resolved but I do not have an easy to to test this on hand. Can you check if this works now? |
This has been fixed so I am closing short of other feedback. Please reopen if this is still an issue |
I exec'ing "c:\install\scancode-toolkit-2.9.2\scancode" from node fails looking for "c:\install\scancode-toolkit-2.9.2\bin\scancode" (note the "bin" segment. Seems that the bin folder is actually a symlink to Scripts. Using normal windows tools (i.e., drag and drop) to unzip the Release zip, you get a windows Junction for bin. That is fine in the UI and from the Command shell but when exec'ing from Node, it seems like the junction is not being followed (or is not available). I don't know enough about the internal workings of node and
exec
to know why this would be different.Since the "Scripts" folder seems to include all the executable stuff, can it just called
bin
rather than using a symlink?as a workaround right now I just deleted the bin link, and copied Scripts to bin. Not sure if there has to be something called Scripts. (i.e., could I have just renamed?)
@pombredanne FWIW, this is for ClearlyDefined.
The text was updated successfully, but these errors were encountered: