Skip to content

Conversation

jshigetomi
Copy link
Contributor

@jshigetomi jshigetomi commented Oct 8, 2024

PR Summary

Fixes: #1708

This pull request introduces several changes to the CompressPSResource cmdlet and its associated tests to enhance functionality and improve test coverage. The most significant changes include adding an output type to the cmdlet, modifying the cmdlet to return a FileInfo object, and expanding the test suite to verify these changes.

Enhancements to CompressPSResource cmdlet:

  • Added [OutputType(typeof(FileInfo))] attribute to the CompressPSResource cmdlet to specify the output type. (src/code/CompressPSResource.cs)
  • Modified the PackNupkg method to return a FileInfo object instead of a string path when the -PassThru parameter is used. (src/code/PublishHelper.cs)

Improvements to tests:

  • Updated the test for Compress-PSResource -PassThru to check that the cmdlet returns a FileInfo object with the correct path and properties. (test/PublishPSResourceTests/CompressPSResource.Tests.ps1)

Code cleanup:

  • Removed an unused using directive for System.Linq in CompressPSResource.cs. (src/code/CompressPSResource.cs)

PR Context

PR Checklist

@jshigetomi jshigetomi marked this pull request as ready for review October 8, 2024 22:20
@alerickson alerickson merged commit 540b090 into PowerShell:master Oct 9, 2024
4 checks passed
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.

Compress-PSResource should output a FileInfo object
2 participants