Skip to content

Use python3 for Python script fallback on Debian - #100

Open
nicolasmorrone-coder wants to merge 1 commit into
jeedom:betafrom
nicolasmorrone-coder:debian13-python3
Open

nicolasmorrone-coder wants to merge 1 commit into
jeedom:betafrom
nicolasmorrone-coder:debian13-python3

Conversation

@nicolasmorrone-coder

@nicolasmorrone-coder nicolasmorrone-coder commented Oct 20, 2026 •

Copy link
Copy Markdown

Description

On Debian 13, a Python script without a shebang fails with python: not found because the plugin's interpreter fallback invokes the unversioned executable. Use python3 for the .py fallback.

This change targets the current beta interpreter-selection code and preserves its handling of explicit commands and executable scripts with shebangs.

Suggested changelog entry

Use Python 3 for Python scripts without a shebang on Debian installations without an unversioned python command.

Related issues/external references

No related issue found in the open-PR search.

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Documentation improvement

Validation

Executed through actual scriptCmd commands as www-data in a disposable Debian 13 / Jeedom 4.6.2 / PHP 8.4 / Python 3.13 VM:

  • A plain .py file without a shebang prints 42 successfully with this beta change.
  • A .py file using #!/usr/bin/env python3 still prints 43 successfully.
  • PHP syntax check passes.

The failure was initially reproduced against the stable code. HTTP, JSON, XML and HTML commands were also exercised during the preceding compatibility work; those paths are unchanged by this one-line patch.

PR checklist

  • Searched open PRs for the same change.
  • Read the linked Contribution Guidelines (the template's documentation URL returned 404).
  • The contribution retains the repository's GNU licensing.
  • Added automated repository tests.
  • Checked whitespace and retained the surrounding code style.

Prepared with AI assistance; the VM validation above was executed before submission.

Contributor-fork GitHub Actions validation passed on this PR commit using the official shared workflow (PHP 7.4, 8.0 and 8.2): https://github.com/nicolasmorrone-coder/plugin-script/actions/runs/39415942318 . Upstream execution remains pending maintainer approval.

@Mips2648

Copy link
Copy Markdown
Contributor

ok but add changelog please

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants