Skip to content

Commit 1e19a4b

Browse files
author
Christine WANJAU
committed
Escape keys when exporting to properties file
1 parent da3f0c6 commit 1e19a4b

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)