Skip to content

API - Setting Chocolatey Config reloads previous in memory values when attempting to set empty values #3905

@AdmiringWorm

Description

@AdmiringWorm

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

When attempting to set new values for the Chocolatey Configuration through the Config.Set method, and one of the changes properties (as an example the proxy URL) have changed from a valid URL to an empty string (or null), then the call reloads back to the URL that had previously been acquired, even when the configuration file on disk have unset (or set the value to empty).

What is Expected?

I would expect the Config.Set method to honor the values that are specified on the Configuration object that is passed in to the handler, even when the property has been set to null or empty.

How Did You Get This To Happen?

TODO: Need to update this with reproducible step once a simple example project is created.

User Story

I as a maintainer of a program that uses the Chocolatey API to reload the configuration,
I want to have the ability to set the proper configuration values,
so that I do not have to relaunch the application to be up to date.

System Details

  • Operating System: Windows 11
  • Windows PowerShell version: 5.1
  • Chocolatey CLI Version: 2.7.2
  • Chocolatey Licensed Extension version: 8.1.0
  • Chocolatey License type: Business
  • Terminal/Emulator: Tabby

Installed Packages

N/A, it is completely unrelated to any packages installed.

Output Log

Currently do not have any output log available for this.

Additional Context

No response

Acceptance Criteria

Unknown at this point. Could be a change to the API itself, or a fix to the config object.

Related Issues

┆Issue is synchronized with this Clickup task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssues where something has happened which was not expected or intended.ClickUp - BacklogUsed when syncing issues between GitHub and Clickup.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions