Skip to content

Option to disable udev rules check #5204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions platformio/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from platformio.package.lockfile import LockFile
from platformio.project.config import ProjectConfig
from platformio.project.helpers import get_default_projects_dir
from platformio.util import get_systype


def projects_dir_validate(projects_dir):
Expand Down Expand Up @@ -65,6 +66,12 @@ def projects_dir_validate(projects_dir):
},
}

if "linux" in get_systype():
DEFAULT_SETTINGS["disable_udev_rules_check"] = {
"description": "Disable udev rules check",
"value": False
}

SESSION_VARS = {
"command_ctx": None,
"caller_id": None,
Expand Down
4 changes: 2 additions & 2 deletions platformio/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import click

from platformio import exception
from platformio import exception, app
from platformio.compat import IS_WINDOWS


Expand Down Expand Up @@ -120,7 +120,7 @@ def _rules_to_set(rules_path):
result.add(line)
return result

if "linux" not in get_systype():
if "linux" not in get_systype() or app.get_setting("disable_udev_rules_check"):
return None
installed_rules = [
"/etc/udev/rules.d/99-platformio-udev.rules",
Expand Down