I see the same results from Vagrantfile and directly over ssh: 

    default: dpkg: /usr/bin/dpkg /usr/lib/dpkg /etc/dpkg /usr/share/dpkg /
usr/share/man/man1/dpkg.1.gz

    default: egrep: /bin/egrep /usr/share/man/man1/egrep.1.gz


vagrant@linux:~$ whereis dpkg
dpkg: /usr/bin/dpkg /usr/lib/dpkg /etc/dpkg /usr/share/dpkg /usr/share/man/
man1/dpkg.1.gz

vagrant@linux:~$ whereis egrep
egrep: /bin/egrep /usr/share/man/man1/egrep.1.gz


I have tried the Vagrantfile on a different machine as a sanity check and 
am getting the same results.  Please feel free to try the Vagrantfile file 
yourself to see if you get anything differently.  


On Sunday, March 3, 2019 at 1:35:07 AM UTC-8, Antony Stone wrote:
>
> On Sunday 03 March 2019 at 02:13:15, shaun smiley wrote: 
>
> > I have a strange issue where the bash code I put into Vagrantfile and 
> run 
> > with 'provision' gives different output than if I copy/paste the exact 
> same 
> > code into the shell of the vagrant machine. 
>
> > $ vagrant provision 
> > ==> default: Running provisioner: shell... 
> >     default: Running: inline script 
> >     default: in dpkg_find, pkgname=vim 
> >     default: NOT_FOUND 
>
> > root@linux:~# dpkg_find vim 
> > in dpkg_find, pkgname=vim 
> > vim install 
> > FOUND 
> > 
> > What is going on here? 
>
> My guess is that you have a different $PATH in the two situations, so at 
> least 
> one of the commands 'dpkg' and 'egrep' are either not being found, or are 
> pointing at different binaries. 
>
> Try adding something like "whereis dpkg; whereis epgrep" to the top of 
> your 
> script and see what those commands output in the two scenarios. 
>
> Antony. 
>
> -- 
> Abandon hope, all ye who enter here. 
> You'll feel much better about things once you do. 
>
>                                                    Please reply to the 
> list; 
>                                                          please *don't* CC 
> me. 
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/1e1e4295-7125-409f-90c9-c56bbb283c39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to