Add parameters to the macOS browser command
Add parameters to the open command, so that it waits for the process to end. Otherwise the process returns immediately and causes ctbrec to go on even though the login process didn't run in the browser. Furthermore we now pass on the config dir for the minimal browser as a command line argument
This commit is contained in:
parent
281d70d29b
commit
7d3e65fc14
|
@ -86,10 +86,16 @@ public class OS {
|
|||
System.arraycopy(args, 0, cmd, 1, args.length);
|
||||
break;
|
||||
case MAC:
|
||||
cmd = new String[args.length + 2];
|
||||
cmd[0] = "open";
|
||||
cmd[1] = new File(browserDir, "ctbrec-minimal-browser.app").getAbsolutePath();
|
||||
System.arraycopy(args, 0, cmd, 2, args.length);
|
||||
cmd = new String[args.length + 5];
|
||||
int index = 0;
|
||||
cmd[index++] = "open";
|
||||
cmd[index++] = "-W";
|
||||
cmd[index++] = "-a";
|
||||
cmd[index++] = new File(browserDir, "ctbrec-minimal-browser.app").getAbsolutePath();
|
||||
if (args.length > 0) {
|
||||
cmd[index] = "--args";
|
||||
System.arraycopy(args, 0, cmd, 5, args.length);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedOperatingSystemException(System.getProperty(OS_NAME));
|
||||
|
|
Loading…
Reference in New Issue