Skip to content

Commit

Permalink
use sys.executable for the root_child_mac binary path
Browse files Browse the repository at this point in the history
  • Loading branch information
maltfield committed Jul 28, 2024
1 parent 6d8aa31 commit 44b6de8
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions src/packages/buskill/root_child_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,43 +167,9 @@ def trigger_softshutdown_mac_halt():
# * https://github.com/BusKill/buskill-app/issues/14#issuecomment-1279975783
# * https://github.com/BusKill/buskill-app/issues/77#issuecomment-2254299923

msg = "sys.path:|" +str(sys.path)+ "|"
logging.info(msg)

msg = "sys.argv:|" +str(sys.argv)+ "|"
logging.info(msg)

msg = "sys.executable:|" +str(sys.executable)+ "|"
logging.info(msg)

msg = "sys.prefix:|" +str(sys.prefix)+ "|"
logging.info(msg)

msg = "os.environ:|" +str(os.environ)+ "|"
logging.info(msg)

msg = "os.getcwd():|" +str(os.getcwd())+ "|"
logging.info(msg)

msg = "__file__:|" +str(__file__)+ "|"
logging.info(msg)

msg = "sys._getframe().f_code.co_filename:|" +str(sys._getframe().f_code.co_filename)+ "|"
logging.info(msg)

import inspect
msg = "inspect.getfile(inspect.currentframe()):|" +str(inspect.getfile(inspect.currentframe()))+ "|"
logging.info(msg)

msg = "inspect.stack():|" +str(inspect.stack())+ "|"
logging.info(msg)

msg = "inspect.getfile(inspect.currentframe()):|" +str(inspect.getfile(inspect.currentframe()))+ "|"
logging.info(msg)

our_filepath = os.path.abspath(__file__)
our_filepath = sys.executable

msg = "Attempting to harden ourselves " +str(our_filepath)
msg = "Attempting to harden " +str(our_filepath)
logging.info(msg)

try:
Expand Down

0 comments on commit 44b6de8

Please sign in to comment.