Allow redbean to accept --assimilate option without complaining (#916)

This allows using --assimilate on Windows or already assimilated binary.
Ref #356.
This commit is contained in:
Paul Kulchenko 2023-11-19 19:02:30 -08:00 committed by GitHub
parent cc5c5319bf
commit 0bffd09433
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {