Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
[ProGet/PGUtil] Bug: When setting feed property only the last one will be retained.
-
Hi again!
I'm setting properties for feeds using
pgutil feeds properties set --api-key=$APIKey --source="$ServerUrl" ` --feed="$feedName" --property="$propertyName" --value="$propertyValue"However only the last property that I set will retain the enabled setting.
This is with pgutil version 2.4.2 targeting ProGet version 2026.8
Here is the relevant snippet from my code (Not complete)
Function Set-FeedProperty{ param ( [Parameter(Mandatory=$true)][string]$feedName, [Parameter(Mandatory=$true)][string]$propertyName, [Parameter(Mandatory=$true)][string]$propertyValue ) $output = pgutil feeds properties set ` --api-key=$APIKey ` --source="$ServerUrl" ` --feed="$feedName" ` --property="$propertyName" ` --value="$propertyValue" 2>&1 if($output -match "error"){ Write-Host "##[error] Property '$propertyName': $output" } else { Write-Debug "##[debug] Property '$propertyName': $output" } } # Enable tracking package usage Set-FeedProperty $feedName "packageStatisticsEnabled" $true Set-FeedProperty $feedName "restrictPackageStatistics" $true Set-FeedProperty $feedName "deploymentRecordsEnabled" $true Set-FeedProperty $feedName "usageRecordsEnabled" $true # Display vulnerability information and enforce vulnerability compliance rules Set-FeedProperty $feedName "vulnerabilitiesEnabled" $true # Display license information and enforce license compliance rules Set-FeedProperty $feedName "licensesEnabled" $true # Show package usage in Projects & Builds (SCA) Set-FeedProperty $feedName "useWithProjects" $trueIf I run it as is, only
useWithProjectswill be enabled

If I comment out the final command,licensesEnabledwill be enabled instead.

If I try to manually set a single property from the CLI afterwards, instead only that property will be set to enabled, resetting the previously enabled property to disabled.
P.S Regarding my previous thread where we discussed the implementation of more settable properties, I apologize for any potential confusion caused by my last message. I had messed up the casing on the property names (Uppercase first letter instead of lowercase).
Best regards
Nils Nilsson
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login