Allow redbean to accept --assimilate option without complaining

This allows using --assimilate on Windows or already assimilated binary.
Ref #356.
This commit is contained in:
Paul Kulchenko 2023-10-27 18:02:13 -07:00
parent 062b2d776e
commit 08a71a2277

View file

@ -7348,6 +7348,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) {