Skip to content

(#548) Remove creation of Chocolatey Install Directory#549

Merged
AdmiringWorm merged 1 commit intochocolatey:hotfix/3.0.3from
AdmiringWorm:bootstrapper-fix
Oct 6, 2023
Merged

(#548) Remove creation of Chocolatey Install Directory#549
AdmiringWorm merged 1 commit intochocolatey:hotfix/3.0.3from
AdmiringWorm:bootstrapper-fix

Conversation

@AdmiringWorm
Copy link
Member

Description Of Changes

This commit removes the manal creation of the Chocolatey CLI directory
where the application will be installed to.
This is done as a change in the Chocolatey CLI script have changed so
that if the directory exists, Chocolatey CLI will fail to install.

This manual creation may have been needed some time in the past, but has
not been needed for several years now.

Motivation and Context

We should not create anything that is not needed to be created, and rely
on the installation script instead to know what to set up for its own
installation.

Testing

  1. Copy the bootstrapper script into a new empty virtual environment without Chocolatey CLI installed.
  2. Run Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; . "<PATH_TO_BOOTSTRAPPER>"; Get-Boxstarter -Force (Replace <PATH_TO_BOOTSTRAPPER> with the path to the location you copied the script.
  3. Verify Chocolatey CLI and boxstarter was successfully installed.

Operating Systems Testing

  • Windows 10

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Fixes #548

@AdmiringWorm AdmiringWorm self-assigned this Oct 5, 2023
@AdmiringWorm AdmiringWorm requested a review from mwallner October 5, 2023 15:31
@AdmiringWorm AdmiringWorm marked this pull request as draft October 5, 2023 15:35
This commit removes the manal creation of the Chocolatey CLI directory
where the application will be installed to.
This is done as a change in the Chocolatey CLI script have changed so
that if the directory exists, Chocolatey CLI will fail to install.

This manual creation may have been needed some time in the past, but has
not been needed for several years now.

We should not create anything that is not needed to be created, and rely
on the installation script instead to know what to set up for its own
installation.
@AdmiringWorm AdmiringWorm changed the base branch from develop to hotfix/3.0.3 October 5, 2023 16:07
@AdmiringWorm AdmiringWorm marked this pull request as ready for review October 5, 2023 16:07
@AdmiringWorm
Copy link
Member Author

Thank you for approving the PR @mwallner. As it was approved, I'll get it merged into the hotfix branch we have for the next release.

@AdmiringWorm AdmiringWorm merged commit fe5a18e into chocolatey:hotfix/3.0.3 Oct 6, 2023
@AdmiringWorm AdmiringWorm deleted the bootstrapper-fix branch October 6, 2023 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bootstrapping Boxstarter fails due to Chocolatey directory already existing

2 participants