fix exit code when using --nodejs option