-
Notifications
You must be signed in to change notification settings - Fork 163
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
Prevent the $env:temp variable from being changed on every run of Install-BoxstarterPackage #442
Comments
$env:temp
is changed on every run of Install-BoxstarterPackage
The following script shows a similar behaviour. But this time the
Outputs
This seems be related to the call to
|
It is the dll Nonetheless the dll When using the IMHO this is both a Where can I see which version of |
@me-kell Thanks for troubleshooting this! We can't replace the DLL with the new one at this stage. This was tried several versions ago and broke a lot of Boxstarter functionality. Updating Boxstarter to use the newer version of Chocolatey is something we are very much aware of though and raised issue #394 to look at it. A solution may be to capture what $env:TEMP before the try{} and restore it in the finally{} block and include enough comments around it to indicate this is a workaround for the issue in Chocolatey 0.10.5. Thoughts? |
I'm currently using this (and similar) workarounds but I wonder why In the following example I capture
The result is as follows. Please note my added bracketing to visualize the different calls. These are:
|
The first two make sense:
The inner one starting at |
This workaroung won't help since the In subsequent calls even though they start with the initial value of The question is: where does Here the example with simplified output to visualize the values of
|
Is it possible to see the source code for |
That's a Chocolatey question. And as it was fixed in previous releases it's something we are going to need to look at working around or at the very least document. |
Have a look at the chocolatey/choco repo. Boxstarter uses 0.10.5 of |
After looking at the code I realized that:
Because
I came to this idea from the Chocolatey documentation on Config-Settings at
UPDATE: See a less invasive workaround below |
@me-kell Thanks for your work on this. If you have it working are you in a position to submit a Pull Request? |
@pauby I'm testing another workaround and evaluating the possible consequences of both workarounds. As far as I am sure of the consequences I'll submit a Pull Request. |
Another (less invasive than above) workaround should include following steps:
This workaround is less invasive since it only needs to change one line of code in Boxstarter.Chocolatey\Invoce-ChocolateyBoxstarter as shown in (2.) On the other side it needs to run the @pauby Would it make sense to set this at the start of Boxstarter? Maybe in
|
hey @me-kell - that looks promising, thank you for digging this up! Considering what you've brought up so far, I'd always vote for the following: As I've recently made a couple of changes in the package parameter handling, I've got a pretty good idea of where I'd implement that. If you're willing to do a PR that'd be awesome, but I can also offer you to take this over from here if you like. |
Hey @me-kell , @pauby - I've had a minute to take a spin on it - what do you think about mwallner@8397369 ? |
@mwallner Can you create a PR with your code so the team can keep track of it? |
hey @MisinformedDNA , I totally lost track of this, thanks for bringing it up again! |
Due to the fact that the new version of Boxstarter will include the new version of Chocolatey, this issue will no longer happen, and additional is no longer required. |
🎉 This issue has been resolved in version 3.0.0 🎉 The release is available on:
Your GitReleaseManager bot 📦🚀 |
as the need for this workaround apparently is fixed by this: chocolatey/boxstarter#442
What You Are Seeing?
$env:temp
is changed on every run ofInstall-BoxstarterPackage
How Did You Get This To Happen? (Steps to Reproduce)
I am running
Boxstarter v2.12.0
andChocolatey v0.10.15
under Windows 10Here is my script to reproduce it. The same behaviour can be observed in
Boxstarter Shell
orPowershell
every time you call
Install-BoxstarterPackage -PackageName "$filename"
additional subdirectorieschocolatey\chocolatey
are appended to$env:temp
Related Issues?
Maybe following issues are related to this one:
The text was updated successfully, but these errors were encountered: