You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo pkg_add works in a manual vagrant ssh session, but when I try to automate installing the same packages by specifying a config.vm.provision in the Vagrantfile, for some reason pkg_add fails.
Perhaps there is some shell configuration that is not being fully loaded in non-interactive mode?
The text was updated successfully, but these errors were encountered:
Ah, PKG_PATH is being configured by /home/vagrant/.profile, which appears to not be loaded by non-interactive sessions, which includes config.vm.provision.
As a workaround, I am explicitly setting PKG_PATH when I run pkg_add commands:
For POSIX-like machines, the shell provisioner executes scripts with SSH.
~/.profile isn't sourced for non-interactive / non-login login shells, for variousreasons. PKG_PATH need to be set with env argument to the shell provisioner.
sudo pkg_add
works in a manualvagrant ssh
session, but when I try to automate installing the same packages by specifying aconfig.vm.provision
in the Vagrantfile, for some reasonpkg_add
fails.Perhaps there is some shell configuration that is not being fully loaded in non-interactive mode?
The text was updated successfully, but these errors were encountered: