Skip to content
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

pg_ctl calls are broken if pg_ctl needs any env variables #1076

Closed
dondelelcaro opened this issue Jan 30, 2025 · 2 comments
Closed

pg_ctl calls are broken if pg_ctl needs any env variables #1076

dondelelcaro opened this issue Jan 30, 2025 · 2 comments

Comments

@dondelelcaro
Copy link

We do some (admittedly odd) things in a custom pg_ctl under our CI/CD environment (basically, becoming a non-root user) which require having $PATH be set, amongst other things. [pg_ctl is a shell script that makes some calls to pg_config before exec'ing the real pg_ctl, so it needs PATH working.]

The changes to fix 343 broke this approach because now the only environmental variables set are LANG and LC_ALL.

Making:

subprocess.check_output(init_directory, env=self._envvars)
subprocess.check_output(init_directory,env=dict(os.environ).update(self._envvars))

or equivalent should fix this.

@fizyk
Copy link
Member

fizyk commented Feb 5, 2025

Okay, I've looked around and, let's say, the fix will be placed in Mirakuru itself 🤔

@fizyk
Copy link
Member

fizyk commented Feb 5, 2025

dbfixtures/mirakuru#842

@fizyk fizyk closed this as completed in 3735b9d Feb 7, 2025
fizyk added a commit that referenced this issue Feb 7, 2025
Pass all environment variables to initdb - closes #1076
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants