Skip to content

WIP: Add -NoNewline to the Set-Content call#142

Open
opoplawski wants to merge 1 commit intochocolatey:masterfrom
opoplawski:install
Open

WIP: Add -NoNewline to the Set-Content call#142
opoplawski wants to merge 1 commit intochocolatey:masterfrom
opoplawski:install

Conversation

@opoplawski
Copy link

Add -NoNewline to the Set-Content call to avoid adding an extra newline to install.ps1 voiding the signature

Description Of Changes

Set-Content is adding a newline to the end of the install.ps1 file.

This is not PowerShell v2 compliant, so not sure how to handle that.

Motivation and Context

Breaks the signature of the file

Testing

- hosts: windows
  gather_facts: false
  tasks:
    - name: "Install chocolatey"
      win_chocolatey:
        name:
          - chocolatey
        state: latest

Operating Systems Testing

Windows 11 Enterprise

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 #141

@opoplawski opoplawski changed the title Add -NoNewline to the Set-Content call WIP: Add -NoNewline to the Set-Content call Dec 12, 2023
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.

Cannot install chocolatey - chocolateyInstall.ps1 is not digitally signed

1 participant