Don't clear the [Vars] group in build-finish command and improve error reporting

This commit is contained in:
Dan Vrátil
2015-05-06 17:37:52 +02:00
parent 69d50fa9f9
commit f035cbef48

View File

@@ -317,8 +317,6 @@ update_metadata (GFile *base, GCancellable *cancellable, GError **error)
}
}
/* We don't care about error here (when the group does not exist for instance) */
g_key_file_remove_group (keyfile, "Vars", NULL);
if (opt_env_override)
{
for (i = 0; opt_env_override[i]; i++)
@@ -328,6 +326,11 @@ update_metadata (GFile *base, GCancellable *cancellable, GError **error)
{
g_key_file_set_string (keyfile, "Vars", split[0], split[1] ? split[1] : "");
}
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Cannot parse variable %s", opt_env_override[i]);
goto out;
}
}
}