[WPE][GTK] webkit-flatpak intercepts --help for other commands
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Sep 2018 16:12:30 +0000 (16:12 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Sep 2018 16:12:30 +0000 (16:12 +0000)
commit1c06ad6a06aaaa95be19e3514db2f89013eb0a2d
tree923fcc80bcbbd57aec5e2c77aa70499a9e0d9be0
parent32db28bc681647f86cb352487a63df688fd9a66d
[WPE][GTK] webkit-flatpak intercepts --help for other commands
https://bugs.webkit.org/show_bug.cgi?id=189058

The approach of run_in_sandbox_if_available is that we basically have the
same set of arguments to setup the sandbox (ie. port name, build type, etc...)
and we can pass those args first to setup the flatpak launcher object
and then to the underlying script. That doesn't work well with the `--help` argument
as once processed it 1. prints the help (which make no sense to the user of the calling script)
2. exits the app - The solution is to just make sure that `--help` is not used when using
flatpakutils from any script that is not `webkit-flatpak` itself.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-09-20
Reviewed by Michael Catanzaro.

* flatpak/flatpakutils.py:
(WebkitFlatpak.load_from_args):
(run_in_sandbox_if_available):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/flatpak/flatpakutils.py