Skip to content

Commit

Permalink
Merge pull request #57 from Kashinathpat/bug-fix
Browse files Browse the repository at this point in the history
 Fix: Handle Spaces in Environment Variable Names and Values
  • Loading branch information
brunodev85 authored Jun 3, 2024
2 parents c8cd9f4 + b6195af commit caef6c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ private String getEnvVars(View view) {
for (int i = 0; i < parent.getChildCount(); i++) {
View child = parent.getChildAt(i);
String name = ((TextView)child.findViewById(R.id.TextView)).getText().toString();
String value = ((EditText)child.findViewById(R.id.EditText)).getText().toString().trim();
String value = ((EditText)child.findViewById(R.id.EditText)).getText().toString().trim().replace(" ", "");
if (!value.isEmpty()) envVars.put(name, value);
}
return envVars.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public AddEnvVarDialog(final Context context, View container) {
setIcon(R.drawable.icon_env_var);

setOnConfirmCallback(() -> {
String name = etName.getText().toString().trim();
String value = etValue.getText().toString().trim();
String name = etName.getText().toString().trim().replace(" ", "");
String value = etValue.getText().toString().trim().replace(" ", "");

if (!name.isEmpty() && !value.isEmpty()) {
LinearLayout parent = container.findViewById(R.id.LLEnvVars);
Expand Down

0 comments on commit caef6c2

Please sign in to comment.