From fdffb2de266bc33b0a01ea9cbd2bfd24dbaf8b05 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 28 Apr 2014 13:21:56 +0200 Subject: [PATCH] Setting CYGWIN=nodosfilewarning env variable on windows --- app/src/processing/app/helpers/ProcessUtils.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/processing/app/helpers/ProcessUtils.java b/app/src/processing/app/helpers/ProcessUtils.java index ebbbb0bcd..d378f991d 100644 --- a/app/src/processing/app/helpers/ProcessUtils.java +++ b/app/src/processing/app/helpers/ProcessUtils.java @@ -1,9 +1,10 @@ package processing.app.helpers; -import java.io.IOException; - import processing.app.Base; +import java.io.IOException; +import java.util.Map; + public class ProcessUtils { public static Process exec(String[] command) throws IOException { @@ -20,6 +21,10 @@ public class ProcessUtils { String[] cmdLine = new String[command.length]; for (int i = 0; i < command.length; i++) cmdLine[i] = command[i].replace("\"", "\\\""); - return Runtime.getRuntime().exec(cmdLine); + + ProcessBuilder pb = new ProcessBuilder(cmdLine); + Map env = pb.environment(); + env.put("CYGWIN", "nodosfilewarning"); + return pb.start(); } }