mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 22:40:16 +01:00
cli: don't print warnings when completing arguments
$ nmcli con add type wifi ifname wlan0 \
wifi-sec.key-mgmt none \
wifi-sec.wep-key0 $ascii_key \
ssid <TAB>
completes the line with:
"Info:\ WEP\ key\ is\ guessed\ to\ be\ of\ '2\ \(passphrase\)'"
The environment warning function should not emit warning when
completing arguments.
(cherry picked from commit 5e239d2c04)
This commit is contained in:
parent
d2372f0a2e
commit
e48b9300bd
1 changed files with 4 additions and 0 deletions
|
|
@ -371,8 +371,12 @@ _env_warn_fcn_handle (const NMMetaEnvironment *environment,
|
|||
const char *fmt_l10n, /* the untranslated format string, but it is marked for translation using N_(). */
|
||||
va_list ap)
|
||||
{
|
||||
NmCli *nmc = environment_user_data;
|
||||
gs_free char *m = NULL;
|
||||
|
||||
if (nmc->complete)
|
||||
return;
|
||||
|
||||
NM_PRAGMA_WARNING_DISABLE("-Wformat-nonliteral")
|
||||
m = g_strdup_vprintf (_(fmt_l10n), ap);
|
||||
NM_PRAGMA_WARNING_REENABLE
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue