Python shebang rewrite doesn't support shebang args

Bug #1730472 reported by Kyle Fazzari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Kyle Fazzari

Bug Description

A few different plugins (python, catkin) rewrite shebangs like #!/usr/bin/python3 to #!/usr/bin/env python3 . For the most part, this works great. However, some projects (take a look at /usr/bin/lsb_release) actually pass arguments to Python in the shebang, e.g. #!/usr/bin/python3 -Es . /usr/bin/env doesn't support args like this-- it ends up searching for the command 'python3 -Es' which of course doesn't exist.

We need to be smarter about this.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :
Changed in snapcraft:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Kyle Fazzari (kyrofa)
importance: High → Medium
Kyle Fazzari (kyrofa)
Changed in snapcraft:
status: In Progress → Fix Committed
milestone: none → 2.35
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.