Skip to content

Commit

Permalink
#98 first pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Shun-Yang committed Aug 22, 2017
1 parent d01d40d commit 8acd20a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions gslab_scons/builders/build_r.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,9 @@ def build_r(target, source, env):

cl_arg = misc.command_line_args(env)

if cl_arg != '':
if misc.is_unix(): # R has platform-specific cl_arg syntax
cl_arg = "'--args %s'" % cl_arg
else:
cl_arg = "\"--args %s\"" % cl_arg

# System call
try:
command = 'R CMD BATCH --no-save %s %s %s' % (cl_arg, source_file, log_file)
command = 'Rscript --no-save --no-restore --verbose %s %s > %s 2>>&1' % (source_file, cl_arg, log_file)
subprocess.check_output(command,
stderr = subprocess.STDOUT,
shell = True)
Expand Down

0 comments on commit 8acd20a

Please sign in to comment.