Open ADD-Izan-Garcia opened 1 month ago
I could not reproduce:
$ Save-PSResource -Name PSWSMan -Version 2.3.0 -Path ./Downloads/ -IncludeXml
$ tree -d ./Downloads/PSWSMan/
./Downloads/PSWSMan/
└── 2.3.0
├── bin
│ ├── glibc-1.0
│ ├── glibc-1.1
│ ├── glibc-3
│ ├── macOS-1.1
│ ├── macOS-3
│ ├── musl-1.1
│ └── musl-3
└── en-US
Its not the same scenario. I think the problem is that instead of taking the version '2024.5.20.1' as exact version, is taking it as minimum version. That's why then the version '2024.5.20.12' is taken.
Its not the same scenario.
A did not find modules with similar versions:
$ Save-PSResource -Name PSWriteColor -Version 0.7 -Path ./Downloads/ -IncludeXml
$ Save-PSResource -Name PSWriteColor -Version 0.71 -Path ./Downloads/ -IncludeXml
$ (dir ./Downloads/PSWriteColor/).Name
0.7
0.71
I also cannot reproduce the problem, at least with the PSWriteColor
module.
The -Version
parameter is explicitly documented as being version-exact (no need for [...]
enclosure), and that to get the minimum-compatible-version behavior you'd have to use something like '[1.0.0,]'
(note the comma).
On second thought:
The Package Versioning rules seem to be based on semver version numbers, which are limited to three components, with an optional suffix.
Therefore, 2024.5.20.1
is not a valid semver ([semver]
) version number (but is a valid [version]
number).
I wonder if the problem is related to that, and how such invalid-as-semver version numbers are de facto / should be handled.
Prerequisites
Steps to reproduce
I am experiencing a problem with
Save-PSResource
. When installing a specific version of a module from a NuGet server, it doesn't take the one specified. Steps to reproduce:Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
No response