Werk #13128: agent_vsphere: Fix bug occuring when vSphere secret has a special format

Component Checks & agents
Title agent_vsphere: Fix bug occuring when vSphere secret has a special format
Date Oct 6, 2021
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.1.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0p13 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

When specifying a vSphere secret starting with a dash (a "-"), the vsphere special agent will run into an error, because the secret will get recognized as an additional command line argument by it's argument parser.

This is fixed now by passing this argument in a more robust way.

To the list of all Werks