Skip to content

Commit

Permalink
return NULL instead of character(0) if input is NULL and dir = TRUE (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Apr 12, 2015
1 parent 2e2a853 commit efc40eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ is_windows = function() .Platform$OS.type == 'windows'
current_input = function(dir = FALSE) {
input = knit_concord$get('infile')
outwd = opts_knit$get('output.dir')
if (is.null(input)) return()
if (dir) {
if (is.null(outwd)) {
warning('Cannot determine the directory of the input document')
Expand Down

0 comments on commit efc40eb

Please sign in to comment.