Skip to content

Commit

Permalink
Merge pull request #19096 from jponge/improvement/use-exec-array
Browse files Browse the repository at this point in the history
Pass arguments arrays to Runtime::exec
  • Loading branch information
jponge authored Jul 29, 2021
2 parents c83927e + 39ee796 commit b8a715a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,13 @@ private void openBrowser(HttpRootPathBuildItem rp, NonApplicationRootPathBuildIt
try {
switch (os) {
case MAC:
rt.exec("open " + url);
rt.exec(new String[] { "open", url });
break;
case LINUX:
rt.exec("xdg-open " + url);
rt.exec(new String[] { "xdg-open", url });
break;
case WINDOWS:
rt.exec("rundll32 url.dll,FileProtocolHandler " + url);
rt.exec(new String[] { "rundll32 url.dll,FileProtocolHandler", url });
break;
case OTHER:
log.error("Cannot launch browser on this operating system");
Expand Down

0 comments on commit b8a715a

Please sign in to comment.