Skip to content

Commit 25f9a07

Browse files
[App Config] az appconfig kv export: Escape keys only when exporting to properties file (#32010)
1 parent fdf3b65 commit 25f9a07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/azure-cli/azure/cli/command_modules/appconfig/_kv_export_helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ def __write_kv_and_features_to_file(
125125
exported_keyvalues, fp, sort_keys=False, width=float("inf")
126126
)
127127
elif format_ == "properties":
128-
javaproperties.dump(exported_keyvalues, fp)
128+
for key, value in exported_keyvalues.items():
129+
fp.write('{}={}\n'.format(javaproperties.escape(key), value))
129130
except Exception as exception:
130131
raise FileOperationError(
131132
"Failed to export key-values to file. " + str(exception)

0 commit comments

Comments
 (0)