mirror of
https://github.com/servo/servo.git
synced 2025-08-23 14:25:33 +01:00
run_in_headless_android_emulator: add support for $HOST_FILE
This commit is contained in:
parent
65df9cb73a
commit
4306336a5b
2 changed files with 16 additions and 1 deletions
|
@ -46,7 +46,6 @@ mod resources;
|
|||
use backtrace::Backtrace;
|
||||
use servo::Servo;
|
||||
use servo::compositing::windowing::WindowEvent;
|
||||
#[cfg(target_os = "android")]
|
||||
use servo::config;
|
||||
use servo::config::opts::{self, ArgumentParsingResult, parse_url_or_filename};
|
||||
use servo::config::servo_version;
|
||||
|
@ -105,6 +104,12 @@ fn main() {
|
|||
|
||||
resources::init();
|
||||
|
||||
if cfg!(target_os = "android") && env::var_os("HOST_FILE").is_none() {
|
||||
let mut path = config::basedir::default_config_dir();
|
||||
path.push("android_hosts");
|
||||
env::set_var("HOST_FILE", path);
|
||||
}
|
||||
|
||||
// Parse the command line options and store them globally
|
||||
let opts_result = opts::from_cmdline_args(&*args());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue