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

CLI-1375: getAhFilesRoot() differences with drush and GUI on STAGE environments #95

Closed
nmillin opened this issue Aug 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@nmillin
Copy link

nmillin commented Aug 16, 2024

This only impacts the STAGE environment. I can work around this, but wanted to let the project know and maybe this will help someone else.

Describe the bug
I am using AcquiaDrupalEnvironmentDetector::getAhFilesRoot() to load a secrets file on ACN. It is working via the GUI, but drush commands report a different path.

  • GUI - /mnt/files/[SITE].stage
  • Drush - /mnt/files/[SITE].test

To Reproduce
Run AcquiaDrupalEnvironmentDetector::getAhFilesRoot() via drush and GUI (echo statement) to see path.

Expected behavior
/mnt/files/[SITE].test to be returned since that is the file path I have on Acquia Cloud Next.

Screenshots
n/a

Environment
n/a

Additional context
n/a

@nmillin nmillin added the bug Something isn't working label Aug 16, 2024
@github-actions github-actions bot changed the title getAhFilesRoot() differences with drush and GUI on STAGE environments CLI-1375: getAhFilesRoot() differences with drush and GUI on STAGE environments Aug 16, 2024
@danepowell
Copy link
Contributor

Can you provide the output of the following code from both the GUI and Drush?

print getenv('AH_SITE_ENVIRONMENT') . "\n";
print $_ENV['AH_SITE_ENVIRONMENT'] . "\n";

You can see that test/stage is coming from the AH_SITE_ENVIRONMENT environment variable, so that must be causing the difference:

public static function getAhEnv(): string {

@nmillin
Copy link
Author

nmillin commented Sep 6, 2024

Thanks @danepowell for the response.

print getenv('AH_SITE_ENVIRONMENT') . "\n";
print $_ENV['AH_SITE_ENVIRONMENT'] . "\n";
Provided differences because of the custom code I'm using updating putenv('AH_SITE_ENVIRONMENT=', but not $_ENV.
I'm going to update my code to not mess with AH_SITE_ENVIRONMENT since that is a bad idea.

Thanks again.

@nmillin nmillin closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants