Skip to content

Fix shebang for Python scripts#3370

Merged
jmgrady merged 3 commits intomasterfrom
fix-shebang
Sep 27, 2024
Merged

Fix shebang for Python scripts#3370
jmgrady merged 3 commits intomasterfrom
fix-shebang

Conversation

@jmgrady
Copy link
Contributor

@jmgrady jmgrady commented Sep 27, 2024

Change the "shebang" for Python scripts from:

#!/usr/bin/env python3

to

#!/usr/bin/env python

The original shebang was set so that Linux users can run the Python scripts by just providing the script name, e.g. ./deploy/scripts/app_release.py --get.

Both of these shebang lines work because the venv module sets up python3 and python to point to the version of Python in the virtual environment. However, when the venv is created on Windows, only the python alias is created. This means that the scripts fail when run from a Git Bash session.

The new shebang works for both environments.


This change is Reviewable

@jmgrady jmgrady added bug Something isn't working python bash labels Sep 27, 2024
@jmgrady jmgrady self-assigned this Sep 27, 2024
@codecov
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.59%. Comparing base (6bbfc5b) to head (e646c51).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3370      +/-   ##
==========================================
- Coverage   74.63%   74.59%   -0.04%     
==========================================
  Files         280      280              
  Lines       10773    10773              
  Branches     1299     1299              
==========================================
- Hits         8040     8036       -4     
- Misses       2367     2370       +3     
- Partials      366      367       +1     
Flag Coverage Δ
backend 83.81% <ø> (-0.09%) ⬇️
frontend 66.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 25 of 25 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @jmgrady)

@jmgrady jmgrady enabled auto-merge (squash) September 27, 2024 18:01
@jmgrady jmgrady merged commit 631d139 into master Sep 27, 2024
@jmgrady jmgrady deleted the fix-shebang branch September 27, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash bug Something isn't working python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments