Skip to content

Non linux-distro shebang #8654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/mac/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for this proposed change?


# Build script to create Mac App Bundle and DMG for pgAdmin4 runtime

Expand Down
2 changes: 1 addition & 1 deletion pkg/pip/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

########################################################################
#
Expand Down
2 changes: 1 addition & 1 deletion pkg/src/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

########################################################################
#
Expand Down
5 changes: 5 additions & 0 deletions web/pgAdmin4.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"""This is the main application entry point for pgAdmin 4. If running on
a webserver, this will provide the WSGI interface, otherwise, we're going
to start a web server."""


import sys
if sys.version_info <= (3, 9):
Expand All @@ -21,6 +22,9 @@
import builtins
import os

##
import webbrowser

# We need to include the root directory in sys.path to ensure that we can
# find everything we need when running in the standalone runtime.
if sys.path[0] != os.path.dirname(os.path.realpath(__file__)):
Expand Down Expand Up @@ -173,6 +177,7 @@ def main():
config.EFFECTIVE_SERVER_PORT)
)
sys.stdout.flush()
webbrowser.open(f"http://{config.DEFAULT_SERVER}:{config.EFFECTIVE_SERVER_PORT}")
Copy link
Contributor

Choose a reason for hiding this comment

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

The URL is already prepared in the previous line, so you can prepare it using a variable and use it in both places.

else:
# For unknown reason the runtime does not pass the environment
# variables (i.e. PYTHONHOME, and PYTHONPATH), to the Python
Expand Down