Provide "force" or "replace" functionality

Open
#115 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
desktop-dev

Research direction

Start by locating the create and remove APIs that handle shortcuts and menu items, then trace where the duplicate-name/location exception is raised. Define the force or replace option's API behavior, including replacement of an existing menu item during package updates, and verify that the existing failure behavior remains unchanged when it is not requested.

Written by the indexing model from the issue text.

Description

stale::recovered type::feature type::poc
Checklist
  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate
What is the idea?

The current API will raise an exception if a shortcut with the same name/location is already in place. It would be nice to have some sort of "force" functionality so that the command does not fail, and overwrites the found menu item with the new one.

Why is this needed?

In the context of updates of application packages, the package containing the menu might be the same for different versions, so having the ability to replace an existing menu with a new version without having to first delete the all one "manually" via the API would be benefitial.

What should happen?

Add a parameter to the create remove API could be an option.

Additional Context

No response

Dominant language
Python
Stars
50
Forks
49
Avg merge
1d 22h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from conda/menuinst

All issues in conda/menuinst

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.