Skip to content

Commit

Permalink
Merge pull request #10 from el-falso/el-falso-fix-gdlint-path
Browse files Browse the repository at this point in the history
- fixes #7
  • Loading branch information
el-falso authored Mar 22, 2024
2 parents 807cefc + 1b9c6c4 commit 983d994
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion addons/gdLinter/gdLinter.gd
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,13 @@ func get_gdlint_path() -> String:
var output := []
OS.execute("python3", ["-m", "site", "--user-base"], output)
var python_bin_folder := (output[0] as String).strip_edges().path_join("bin")
return python_bin_folder.path_join("gdlint")
if FileAccess.file_exists(python_bin_folder.path_join("gdlint")):
return python_bin_folder.path_join("gdlint")

# Linux dirty hardcoded fallback
if OS.get_name() == "Linux":
if FileAccess.file_exists("/usr/bin/gdlint"):
return "/usr/bin/gdlint"

# Global fallback
return "gdlint"

0 comments on commit 983d994

Please sign in to comment.