When provisioning a virtual machine through vagrant, it synchronizes files from ./remote_files/ to /minitwit/ in order to call deploy.sh in the deploy pipeline.
However, since line endings are different on Windows and Unix-based machines, the script is unable to run on a unix machine when it is synchronized like this.
It is possible to use dos2unix on the file to remove line endings quickly.
Currently the process is to ssh into the machine after provisioning and running sudo apt install dos2unix and then dos2unix /minitwit/deploy.sh.
According to this article, apt is for interactive use and the current interactive process requires a confirmation so we need to figure out another way to script this effectively to ensure similar behaviour between operating systems.
When provisioning a virtual machine through
vagrant
, it synchronizes files from./remote_files/
to/minitwit/
in order to calldeploy.sh
in the deploy pipeline.However, since line endings are different on Windows and Unix-based machines, the script is unable to run on a unix machine when it is synchronized like this.
It is possible to use
dos2unix
on the file to remove line endings quickly.Currently the process is to ssh into the machine after provisioning and running
sudo apt install dos2unix
and thendos2unix /minitwit/deploy.sh
.According to this article,
apt
is for interactive use and the current interactive process requires a confirmation so we need to figure out another way to script this effectively to ensure similar behaviour between operating systems.