potatoqualitee / psmodulecache

This action makes caching PowerShell modules from the PowerShell Gallery easy for Linux, Windows and macOS runners.
MIT License
31 stars 12 forks source link

Output has null version number #58

Closed jpomfret closed 11 months ago

jpomfret commented 11 months ago

Hey Chrissy 👋

I noticed the output for this is missing the version number on the first line for each module - shown below. The second line of output does have the version.

Saving module 'dbatools.library' version '' to '/usr/local/share/powershell/Modules/'. Search in the following repositories 'PSGallery'
    Module 'dbatools.library' version '2023.9.21' found in 'PSGallery'.
Saving module 'dbatools' version '' to '/usr/local/share/powershell/Modules/'. Search in the following repositories 'PSGallery'
    Module 'dbatools' version '2.1.6' found in 'PSGallery'.

I think it comes from here - but not sure what it should be 🤔

https://github.com/potatoqualitee/psmodulecache/blob/main/PSModuleCache.psm1#L1077

LaurentDardenne commented 11 months ago

Hi, the message construct appears to be from the version 5.2.

If I remember correctly, the line had the function of informing about the requested version and the saved one.

Should check with version 6.0 which supports dependent modules.

Where do these logs come from?

jpomfret commented 11 months ago

Yep - you are correct @LaurentDardenne - my bad!

Closing this - it works perfectly on 6.0