Skip to content

fix: embed PLUGIN_DIR in bash -lc command to survive login shell env reset#23

Merged
vitormattos merged 1 commit into
mainfrom
fix/plugin-dir-login-shell
May 14, 2026
Merged

fix: embed PLUGIN_DIR in bash -lc command to survive login shell env reset#23
vitormattos merged 1 commit into
mainfrom
fix/plugin-dir-login-shell

Conversation

@vitormattos
Copy link
Copy Markdown
Member

When post_install_commands run via bash -lc, the login shell sources /etc/profile and /etc/profile.d/* scripts which can discard variables exported by the parent process.

Symptom: $PLUGIN_DIR expanded to empty, causing the Polylang Pro symlink command to target /integrations/ACF instead of the full plugin path:

ln: failed to create symbolic link '/integrations/ACF': No such file or directory

Fix: embed the variable directly in the string passed to bash -lc so it is set inside the login shell before the command runs:

bash -lc "export PLUGIN_DIR='$plugin_dir'; $command"

…reset

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos merged commit af2c0d5 into main May 14, 2026
2 checks passed
@vitormattos vitormattos deleted the fix/plugin-dir-login-shell branch May 14, 2026 01:03
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

Successfully merging this pull request may close these issues.

1 participant