From 0bffd0943371521c1b93eed55a2dbbcc2e1e6b46 Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Sun, 19 Nov 2023 19:02:30 -0800 Subject: [PATCH] Allow redbean to accept --assimilate option without complaining (#916) This allows using --assimilate on Windows or already assimilated binary. Ref #356. --- tool/net/redbean.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tool/net/redbean.c b/tool/net/redbean.c index 0179ce0dc..f7f934bf8 100644 --- a/tool/net/redbean.c +++ b/tool/net/redbean.c @@ -7349,6 +7349,9 @@ static void GetOpts(int argc, char *argv[]) { void RedBean(int argc, char *argv[]) { char ibuf[21]; int fd; + // don't complain about --assimilate if it's the only parameter, + // as it can only get here if it's already native or assimilated + if (argc == 2 && strcmp(argv[1], "--assimilate") == 0) return; if (IsLinux()) { // disable weird linux capabilities for (int e = errno, i = 0;; ++i) {