feat: use xvfb for WK on linux
This commit is contained in:
parent
65a52294e2
commit
f5b7f30144
|
|
@ -31,7 +31,18 @@ function runLinux() {
|
||||||
echo "Cannot find a MiniBrowser.app in neither location" 1>&2
|
echo "Cannot find a MiniBrowser.app in neither location" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_PATH $MINIBROWSER "$@"
|
|
||||||
|
newargs=""
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [[ "$arg" == "--headless" ]]; then
|
||||||
|
if which xvfb-run > /dev/null; then
|
||||||
|
MINIBROWSER="xvfb-run $MINIBROWSER"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
newargs="$newarg$arg"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_PATH $MINIBROWSER "$newargs"
|
||||||
}
|
}
|
||||||
|
|
||||||
SCRIPT_PATH="$(cd "$(dirname "$0")" ; pwd -P)"
|
SCRIPT_PATH="$(cd "$(dirname "$0")" ; pwd -P)"
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ export class Launcher {
|
||||||
stdio = ['ignore', 'ignore', 'ignore', 'pipe', 'pipe'];
|
stdio = ['ignore', 'ignore', 'ignore', 'pipe', 'pipe'];
|
||||||
webkitArguments.push('--inspector-pipe');
|
webkitArguments.push('--inspector-pipe');
|
||||||
// Headless options is only implemented on Mac at the moment.
|
// Headless options is only implemented on Mac at the moment.
|
||||||
if (process.platform === 'darwin' && options.headless !== false)
|
if (options.headless !== false)
|
||||||
webkitArguments.push('--headless');
|
webkitArguments.push('--headless');
|
||||||
const webkitProcess = childProcess.spawn(
|
const webkitProcess = childProcess.spawn(
|
||||||
webkitExecutable,
|
webkitExecutable,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue