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
8 changes: 8 additions & 0 deletions resources/NpmDsc/NpmDsc.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@
$inDesiredState = $this.Test()
if ($this.Ensure -eq [Ensure]::Present) {
if (-not $inDesiredState) {
# TODO: Handling owner/repo package references pointing to GH repositories requires accounting
# for git errors (missing git, failed authentication, etc.).
#
# See: https://docs.npmjs.com/cli/v11/commands/npm-install#description

Check warning on line 349 in resources/NpmDsc/NpmDsc.psm1

View workflow job for this annotation

GitHub Actions / Check Spelling

`npmjs` is not a recognized word. (unrecognized-spelling)
if (($this.Name -notmatch '^git(?:\+(?:ssh|https?|file))?://') -and $this.Name.Contains('/') -and -not $this.Name.StartsWith('@')) {
throw "The Set operation currently only supports packages specified as [<@scope>/]<name>. The given package looks like a GitHub repository: $($this.Name)."
}

Install-NpmPackage -PackageName $this.Name -Arguments $this.Arguments -Global $this.Global
}
} else {
Expand Down
Loading