GithubHelp home page GithubHelp logo

Comments (15)

cmhamm avatar cmhamm commented on June 2, 2024

Nope, I think I was wrong. $devKitInstallDir does seem to be pointed at $env:systemroot\tools, which makes line 89 correct.

However, looking over the script running order, it looks like it cleans out the contents of that folder, then downloads and extracts from 'http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe'

Running and monitoring the installer, it looks like it's trying to run lines 90-91 before the other process has had a chance to re-download the archive that contains dk.rb.

Again, not fully understanding the entire Chocolatey process, is there a way to ensure that download has completed before running lines 90-91?

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on June 2, 2024

@cmhamm perhaps you can help by specifically linking to the line numbers? https://github.com/ferventcoder/chocolatey-packages/blob/master/manual/ruby2.devkit/tools/chocolateyInstall.ps1#L67-L91

As in what process has had a change to redownload the archive?

from chocolatey-packages.

cmhamm avatar cmhamm commented on June 2, 2024

Line 67 is "Start-Process "7za" -ArgumentList "x -o"$devKitInstallDir" -y "$file"" -Wait"

It looks like, at least on my machine, it's not waiting. I'm getting an admin prompt, I believe for the 7z executable, and it goes right onto the next process. I'm going to try to debug chocolatey...

from chocolatey-packages.

cmhamm avatar cmhamm commented on June 2, 2024

Sorry - I have lots of experience in IT, but I am not a seasoned coder... Never even knew that line numbers could be linked.

I'm not sure what you're asking about what process has had a change. When I run the chocolatey installer, it tries to clear out the DevKit2 folder each time the installer script is run. It does successfully re-extract the archive after it runs, but it's definitely not waiting for the Start-Process to complete before moving on.

On my system, adding -NoNewWindow to the end of the Start-Process cmdlet seems to make it behave properly. What I'm not completely sure about is whether or not that would cause other problems in the script.

from chocolatey-packages.

cmhamm avatar cmhamm commented on June 2, 2024

I don't know how to properly test the installer if I changed line 67 to:

Start-Process "7za" -ArgumentList "x -o`"$devKitInstallDir`" -y `"$file`"" -Wait -NoNewWindow

but I think that would resolve at least my problem. Also there are two other reports that I could find on the Internet of people having the same error. It's possible that it's because of one of the thousands of things I've done to my computer. 😄

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on June 2, 2024

PowerShell v3?

from chocolatey-packages.

cmhamm avatar cmhamm commented on June 2, 2024

I'm using PowerShell 5 on Windows 8.1.

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on June 2, 2024

Weird that the no wait bug is back. It was in POSH v3 as well. See chocolatey-archive/chocolatey#516 for details.

from chocolatey-packages.

cmhamm avatar cmhamm commented on June 2, 2024

I can't say for certain that it is the exact same bug, but it is the same behavior. Worth noting, though, that I did try running Chocolatey from within a PowerShell window vs. running from a command window, and it still did not work correctly.

from chocolatey-packages.

thj-dk avatar thj-dk commented on June 2, 2024

I'm having the same problem on Windows 10. Did you solve it?

from chocolatey-packages.

falken avatar falken commented on June 2, 2024

Still having this problem when launching from Ansible. Has there been any progress?

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on June 2, 2024

@thj-dk @falken What versions of Chocolatey and PowerShell do you have?

from chocolatey-packages.

falken avatar falken commented on June 2, 2024

Chocolatey: 0.9.10.3
Powershell: 3.0
Ansible: 1.9.1

We found that it worked fine if we set the "chocolateyUseWindowsCompression" env variable to true. Otherwise it attempted to run the chocolateyInstall.ps1 file before it was extracted.

from chocolatey-packages.

ferventcoder avatar ferventcoder commented on June 2, 2024

Now that Choco uses 7z.exe (full) plus we've changed up the code for this in Chocolatey, I'm not sure this is still an issue. If you find it is, please feel free to comment.

@falken If you are still seeing the same issue, please file an issue on https://github.com/chocolatey/choco

from chocolatey-packages.

falken avatar falken commented on June 2, 2024

We are still experiencing the problem. It seems to only occur when the choco script is run through ansible. Ansible runs choco.exe install -dv -y ruby2.devkit -y --x86 -version 4.7.2.2013022402 which fails to unzip all of the files. When running the command directly on the machine it succeeds. The only difference I can see is that the package is launching a second shell window that runs 7za.exe. I'm not sure why it would need to open a second shell to do that.

from chocolatey-packages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.