Allow removal of preshared keys (#1385)

* update cli commands to respect an empty string and handle different from undefined

* remove test for unintended behaviour

* remove test for unintended behaviour
This commit is contained in:
pascal-fischer
2023-12-14 11:48:12 +01:00
committed by GitHub
parent 19fa071a93
commit f73a2e2848
5 changed files with 11 additions and 26 deletions

View File

@ -85,7 +85,8 @@ func runInForegroundMode(ctx context.Context, cmd *cobra.Command) error {
NATExternalIPs: natExternalIPs,
CustomDNSAddress: customDNSAddressConverted,
}
if preSharedKey != "" {
if rootCmd.PersistentFlags().Changed(preSharedKeyFlag) {
ic.PreSharedKey = &preSharedKey
}