Merge remote-tracking branch 'lenormf/startup_info-no_kakrc'

This commit is contained in:
Maxime Coste 2020-02-16 10:40:12 +11:00
commit 4438895cd5

View File

@ -1161,10 +1161,11 @@ int main(int argc, char* argv[])
try
{
auto ignore_kakrc = (bool)parser.get_switch("n");
auto flags = (ignore_kakrc ? ServerFlags::IgnoreKakrc : ServerFlags::None) |
(parser.get_switch("d") ? ServerFlags::Daemon : ServerFlags::None) |
(parser.get_switch("ro") ? ServerFlags::ReadOnly : ServerFlags::None) |
((argc == 2 and ignore_kakrc) and isatty(0) ? ServerFlags::StartupInfo : ServerFlags::None);
auto flags = (ignore_kakrc ? ServerFlags::IgnoreKakrc : ServerFlags::None) |
(parser.get_switch("d") ? ServerFlags::Daemon : ServerFlags::None) |
(parser.get_switch("ro") ? ServerFlags::ReadOnly : ServerFlags::None) |
((argc == 1 or (ignore_kakrc and argc == 2))
and isatty(0) ? ServerFlags::StartupInfo : ServerFlags::None);
auto debug_flags = option_from_string(Meta::Type<DebugFlags>{}, parser.get_switch("debug").value_or(""));
return run_server(session, server_init, client_init, init_coord, flags, ui_type, debug_flags, files);
}