Fails to fix shebang of script installed with Python under a long path

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli, tooling

Research direction

Start by reproducing the reported long-path shebang case with the pathfix tool and compare it with the normal short-path form. Done means pathfix recognizes the shell-wrapper form and rewrites it to the appropriate short interpreter shebang without changing unrelated scripts.

Written by the indexing model from the issue text.

Description

When using a Python interpreter installed in a path that exceeds 127 characters installed scripts will have a shebang of the following form:

#!/bin/sh
'''exec' /some-very-long-path-to-your-python-interpreter-that-exceeds-127-characters/foooooooooooooooooooooooooooooobar/bin/python3.12 "$0" "$@"
' '''

instead of the normal

#!/some-short-path/bin/python3.12

pathfix fails to fix the form for long paths and leaves it unchanged.

Dominant language
Python
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.