On the pipeline runner, git replaced the \r\n windows line ending with just \n
and the parser is sensitive to this. It thinks the message is one long line and is thus not finding the PV1 segment as expected.
I just install dos2unix and convert the file that contains the HL7 Message. Here's the pipeline script.
# install dos2unix for converting unix to dos
- task: CmdLine@2
displayName: 'Install dos2unix'
inputs:
script: |
echo installing dos2unix
sudo apt-get update
sudo apt-get install -y dos2unix
- task: CmdLine@2
displayName: 'Convert Files from Unix to DOS Format'
inputs:
script: |
echo converting files from Unix to DOS format
find **Integrations/**/*HL7.Parser.UnitTests -name '*.cs' -type f -exec unix2dos {} \;