Skip to content

Compress-PSResource does not compress scripts #1715

@alerickson

Description

@alerickson

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

  1. Create script
New-ScriptFileInfo TestScript\TestScript.ps1 -Description "Test script for PowerShell CI" -Author "PSGetAuth"
  1. Run
Compress-PSResource -Path .\TestScript.ps1 -DestinationPath c:\destination

or

Compress-PSResource -Path .\TestScript -DestinationPath c:\destination

Expected behavior

Packs the nupkg and places it in c:\destination.

Actual behavior

For the first Compress example above:
No error, but does not create the nupkg.

For the second example:

Compress-PSResource: No file with a .psd1 extension was found in ''. Please specify a path to a valid module manifest.

Error details

No response

Environment data

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     1.1.0      preview2   Microsoft.PowerShell.PSResourceGet  {Compress-PSResource, Find-PSResource, Get-Instal…


Name                           Value
----                           -----
PSVersion                      7.4.5
PSEdition                      Core
GitCommitId                    7.4.5
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions