Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions PSDepend/Private/Import-PSDependModule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
Force = $true
}
if ($Version -and $Version -ne 'latest') {
$importParams.add('RequiredVersion',$Version)
# Sanitize version string. The RequiredVersion parameter is a System.Version and
# doesn't know anything about pre-release tags.
$BaseVersion = ($Version -split '-')[0]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're still not loading the pre-release in this instance.

$importParams.add('RequiredVersion',$BaseVersion)
Comment on lines 18 to +22
}
Import-Module @importParams
}
}
}
}
Loading