@@ -0,0 +1,52 @@
1+From 0ff560ba912fad126576818519035c8d3c693bed Mon Sep 17 00:00:00 2001
2+From: maechler <maechler@00db46b3-68df-0310-9c12-caf00c1e9a41>
3+Date: Mon, 24 Apr 2017 14:24:11 +0000
4+Subject: [PATCH] R CMD Sweave status bug fix
5+
6+git-svn-id: https://svn.r-project.org/R/trunk@72612 00db46b3-68df-0310-9c12-caf00c1e9a41
7+
8+diff --git a/src/library/utils/R/Sweave.R b/src/library/utils/R/Sweave.R
9+index 2beb094..8d4950b 100644
10+--- a/src/library/utils/R/Sweave.R
11++++ b/src/library/utils/R/Sweave.R
12+@@ -1,7 +1,7 @@
13+ # File src/library/utils/R/Sweave.R
14+ # Part of the R package, https://www.R-project.org
15+ #
16+-# Copyright (C) 1995-2016 The R Core Team
17++# Copyright (C) 1995-2017 The R Core Team
18+ #
19+ # This program is free software; you can redistribute it and/or modify
20+ # it under the terms of the GNU General Public License as published by
21+@@ -452,10 +452,10 @@ SweaveHooks <- function(options, run = FALSE, envir = .GlobalEnv)
22+ }
23+ do_exit <-
24+ if(no.q)
25+- function(status = 1L) (if(status) stop else message)(
26++ function(status = 0L) (if(status) stop else message)(
27+ ".Sweave() exit status ", status)
28+ else
29+- function(status = 1L) q("no", status = status, runLast = FALSE)
30++ function(status = 0L) q("no", status = status, runLast = FALSE)
31+
32+ if (!length(args)) {
33+ Usage()
34+@@ -577,16 +577,15 @@ SweaveHooks <- function(options, run = FALSE, envir = .GlobalEnv)
35+ }
36+ do_exit <-
37+ if(no.q)
38+- function(status = 1L) (if(status) stop else message)(
39++ function(status = 0L) (if(status) stop else message)(
40+ ".Stangle() exit status ", status)
41+ else
42+- function(status = 1L) q("no", status = status, runLast = FALSE)
43++ function(status = 0L) q("no", status = status, runLast = FALSE)
44+
45+ if (!length(args)) {
46+ Usage()
47+ do_exit(1L)
48+ }
49+-
50+ file <- character()
51+ encoding <- options <- ""
52+ engine <- NULL