- If it is not set, check-net could be run at unauthorized
directory and it would fail when try creating new file.
And this causes network failure in VM with host-proxy.
Change-Id: Ie98ecdbcc143693fb3082f6fda9fbceb8ac6968b
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
int exitValue = 0;
Process process = null;
- if (directory != null) {
+ String workingDirPath = null;
+ if (directory == null) {
+ workingDirPath = System.getProperty("user.dir");
+
+ } else {
+ workingDirPath = directory.getAbsolutePath();
pb.directory(directory);
}
EMLogger.getLogger().log(Level.INFO, "Try to run external process: " + cmd.get(0)); //$NON-NLS-1$
+ EMLogger.getLogger().log(Level.INFO, " -- Working dir : " + workingDirPath);
try {
process = pb.start();
List<String> cmd = Arrays.asList(FilePathResources.getEmulatorCheckToolPath()
+ File.separator + proxyCommand, "--proxy"); //$NON-NLS-1$
- ProcessResult res = HelperClass.runProcess(cmd);
+ File workingDir = new File(FilePathResources.getToolEmulatorBinPath());
+ ProcessResult res = HelperClass.runProcess(cmd, workingDir);
EMLogger.getLogger().info(
"check-net result : " + res.getResultMessage()); //$NON-NLS-1$