Skip to content

In PSConfiguration.cs, WriteValueToFile() should check if value has changed before writing #8325

Closed

Description

Summary of the new feature/enhancement

Currently, the WriteValueToFile() method always writes to the config file even if the value didn't change. We could add logic to check if the value has changed before writing to the file.

Activity

  1. added
    Issue-Code Cleanup
    on Nov 20, 2018
  2. daxian-dbw commented on Dec 3, 2018

    @daxian-dbw
    Member

    That means WriteValueToFile() need to read the data and do the comparison, which possibly has already done by the code calling WriteValueToFile. If it's a scenario that we care to skip a write when the value is the same, such as experimental feature changes, I think the check should happen before calling WriteValueToFile.

  3. SteveL-MSFT commented on Dec 5, 2018

    @SteveL-MSFT
    MemberAuthor

    This was addressed in #8318 agreeing to check before calling WriteValueToFile()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Code CleanupResolution-Fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions