set the env for UPDATE_PACKAGE (the source zip) for update-binary. This allows shell scripts to use the source zip.

Change-Id: Ia8118b31408f687780dd45e14f540a7e76619cba
This commit is contained in:
Koushik Dutta 2011-05-15 18:48:17 -07:00
parent 4d5109cfa8
commit 20b516a408

View File

@ -181,6 +181,7 @@ try_update_binary(const char *path, ZipArchive *zip) {
pid_t pid = fork();
if (pid == 0) {
setenv("UPDATE_PACKAGE", path, 1);
close(pipefd[0]);
execv(binary, args);
fprintf(stdout, "E:Can't run %s (%s)\n", binary, strerror(errno));