am: don't die in read_author_script()
[gitweb.git] / builtin / am.c
index 5e643e2a3e3d70d9c674d3edab2eb1f2f08f3392..4f7f28a9dcd7752364bdcbc3aa1027bf5891b371 100644 (file)
@@ -318,7 +318,8 @@ static int read_author_script(struct am_state *state)
        if (fd < 0) {
                if (errno == ENOENT)
                        return 0;
-               die_errno(_("could not open '%s' for reading"), filename);
+               return error_errno(_("could not open '%s' for reading"),
+                                  filename);
        }
        strbuf_read(&buf, fd, 0);
        close(fd);