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.

Reply via email to