Skip to content

Tab complete executes commandline command already. #3010

@w1ll-i-code

Description

@w1ll-i-code

Describe the bug

When using tab-complete in icingacli director, the command will sometimes get already executed.

To Reproduce

  1. Type icingacli director host create test --check_command dummy -- into the commandline
  2. Without hitting enter, trigger the tab-completion
  3. Notice that the host has been created already.
  4. Hitting tab-complete again will print an error that the object already exists.

Expected behavior

The object should only ever be created if the command is actually run.

Screenshots

Image

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Director version (System - About): 1.11.4
  • Icinga Web 2 version and modules (System - About): 2.12.4
  • Icinga 2 version (icinga2 --version):
  • Operating System and version: Red Hat Enterprise Linux release 8.10 (Ootpa)
  • Webserver, PHP versions: php-7.4.33-2.module+el8.10.0+22485+a3539972.x86_64

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