aloubyansky / pm

Apache License 2.0
0 stars 7 forks source link

CLI: uninstall completion should suggest things that are actually installed #218

Open aloubyansky opened 6 years ago

aloubyansky commented 6 years ago

At the moment, uninstall completion is basically identical to the install command completion, i.e. it is suggesting the candidates querying the artifact repository. It'll be more reasonable to suggest artifacts that are actually installed. uninstall can target the current directory (when the --dir arg is missing) or a dir specified in the --dir argument. The first thing to do will be to identify whether the current or the specified dir is a valid home dir containing the provisioned state. So the completion of the uninstall should start with the home dir. Once the home dir has been confirmed, the command can use the ProvisioningManager.getProvisioningConfig() to get the list of the artifacts installed. NOTE: it might not be obvious from which stream those artifacts were installed. We'll probably need some more data in the provisioned state for that. But the feature-pack GAVs at least are there.

jfdenise commented 6 years ago

@aloubyansky , I am looking into that.