We're moving to Discord! Join us at https://ch0.co/community and https://ch0.co/community-support
Do
git remote remove upstream
followed by:
git remote add upstream https://github.com/chocolatey/boxstarter.git
git@github
URL assumes that you are using an SSH key, which it doesn't look like you are
$PROFILE
properties are all empty? They are not empty outside of Boxstarter.Profile: C:\Users\Dan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Profile: C:\Users\Dan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Profile.CurrentUserAllHosts:
Profile.CurrentUserAllHosts:
Profile.CurrentUserCurrentHost:
Profile.CurrentUserCurrentHost:
Profile.AllUsersAllHosts:
Profile.AllUsersAllHosts:
Profile.AllUsersCurrentHost:
Profile.AllUsersCurrentHost:
refreshenv
runs successfully, but doesn't update $env:path
. But if I then run Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1; refreshenv
, then it does. Is it expected that refreshenv
doesn't do a complete refresh? Also, is there a reason why Boxstarter doesn't automatically import chocolateyProfile.psm1
?
Invoke-Reboot
in the script without any tests around about it, you will get a reboot every time Boxstarter gets to that line in your script. Have a look at the function help.
Install-ChocolateyVsixPackage
in my Boxstarter package, but it always fails with "ERROR: Visual Studio is not installed or the specified version is not present". Debugging through the code, I believe it is looking for a registry entry with a property named "InstallDir", but it doesn't exist.
choco upgrade visualstudio2019enterprise
Install-ChocolateyVsixPackage
helper unfortunately only works for older version of Visual Studio (I think it was for VS2015 and below). You need to use a helper function in the package chocolatey-visualstudio.extension instead
function Install-VisualStudioVsixExtensionFromVSMarketplace($itemName) {
$packageUrl = Get-VisualStudioMarketplaceDownloadUrl($itemName)
Install-VisualStudioVsixExtension -Name $itemName -Url $packageUrl
}
function Get-VisualStudioMarketplaceDownloadUrl($itemName) {
$marketplaceUrl = "https://marketplace.visualstudio.com/"
$itemUrl = "$($marketplaceUrl)items?itemName=$itemName"
$response = Invoke-WebRequest $itemUrl -UseBasicParsing
$href = ($response.Links | Where-Object { $_.class -eq "install-button-container" }).href
return "$marketplaceUrl$href"
}
Install-VisualStudioVsixExtensionFromVSMarketplace MadsKristensen.Tweaks