Skip to content

Provide ability to manage remembered arguments for a package #3839

@gep13

Description

@gep13

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

In the current version of Chocolatey CLI, 2.6.0, when the useRememberedArgumentsForUpgrades feature is enabled, if you install a package using command line arguments, those command line arguments (if they are part of the collection of arguments that are allowed) are saved within a .arguments file, and then when the package is upgraded, these arguments are hydrated from the .arguments file, so that they don't need to be set at the command line each time a package is upgraded.

Currently, it is possible to "see" what command line arguments have been persisted for a given package, by using the choco info command, for example

choco info chocolatey-agent --local-only

which will show:

Image

However, this is the only management of these arguments that can be done.

If you wanted to remove these arguments, so that they are not applied during the next upgrade, you would have to go into the .chocolatey folder, and find the .arguments file for the package you want to upgrade, and then delete the .arguments file.

This isn't ideal, as it relies on the end user having knowledge outwith the day to day running of Chocolatey CLI.

Describe The Solution. Why is it needed?

The solution here would be to introduce another Chocolatey CLI command to allow the full management of remembered arguments for a package. This would include the sub-commands:

  • list
  • set
  • unset

With this in place, the end user could then choose to:

  • "see" the remembered arguments for a package
  • reset the remembered arguments, without the need to go hunting for a .arguments file
  • augment the remembered arguments, by adding additional arguments for the next upgrade

Due to the fact that the remembered arguments are encrypted within the .arguments file, it is not possible to manaully augment the arguments that have been saved for a given package.

The suggested command name for this functionailty would be choco arguments, but open to other suggestions here.

Additional Context

The need for this feature came out of a discussion that was had internally on this issue, please refer to that for any additional context that might be required.

Acceptance Criteria

  • User is able to show the remembered arguments for a package using the list sub-command
  • User is able to reset the remembered arguments for a package using the unset sub-command
  • User is able to add/modify the remembered arguments for a package using the set sub-command
  • User is not able to change remembered arguments for anything other than the latest package version
  • User no longer sees the remembered arguments when running the choco info command
  • User is able to use the -r command line option to get a machine readable version of the remembered arguments

Related Issues

No response

┆Issue is synchronized with this Clickup task by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - BacklogIssue is accepted, but is not ready to be worked on or not in current sprint.ClickUp - BacklogUsed when syncing issues between GitHub and Clickup.EnhancementIssues that introduce new functionality to the project, or enhances/updates existing functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions