Skip to content

uninstall command executes on implicit context when argument is missing #1017

@AshokThangavel

Description

@AshokThangavel

The uninstall command does not strictly enforce the requirement for a module name argument or the -all flag, despite what is stated in the help documentation. Instead, it appears to target modules based on an internal "contextual stack" (likely the most recently listed or loaded modules). This leads to accidental uninstallation of applications when a user executes the command without parameters.

zpm:LEARNING>list
IPM (zpm)                      0.10.4
webfslog (web-fslog)           1.0.2
embeddedpy-bridge              1.0.1
DocDBUI (docdb-ui)             1.0.4
FHIRServerLogs (irisfsrepolog) 1.0.3
testify                        1.0.2
interop-lookuptable            1.0.2
zpm:LEARNING>uninstall
 
[LEARNING|Testify]      Clean START
[LEARNING|Testify]      Unconfigure START
[LEARNING|Testify]      Unconfigure SUCCESS
[LEARNING|Testify]      Clean SUCCESS
zpm:LEARNING>uninstall
 
[LEARNING|Interop-LookupTable]  Clean START
[LEARNING|Interop-LookupTable]  Unconfigure START
[LEARNING|Interop-LookupTable]  Unconfigure SUCCESS
[LEARNING|Interop-LookupTable]  Clean SUCCESS
zpm:LEARNING>uninstall
 
ERROR! Module '' not found.

Actual Behavior

  • IPM automatically selects a module (e.g., testify) and begins the uninstallation process:
  • Running uninstall again continues to "pop" modules off the list until the stack is empty, at which point it finally throws ERROR! Module '' not found.

Expected Behavior

According to the help uninstall documentation:

uninstall [flags] [<module>]
module: Name of module to uninstall

The command should fail with an error such as "ERROR: Module name required" unless the -all flag is explicitly provided. It should not guess which module to delete based on the previous command's output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions