Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ampersand in Microsoft.Health.Fhir.TemplateManagement.csproj #432

Closed
emluk opened this issue Oct 4, 2022 · 1 comment · Fixed by #433
Closed

Missing ampersand in Microsoft.Health.Fhir.TemplateManagement.csproj #432

emluk opened this issue Oct 4, 2022 · 1 comment · Fixed by #433
Assignees
Labels
bug Something isn't working

Comments

@emluk
Copy link
Contributor

emluk commented Oct 4, 2022

Hi everyone,

Line 89 of Microsoft.Health.Fhir.TemplateManagement.csproj seems to be missing an & which makes the build fail on linux.

OS: Arch Linux (Linux {user} 5.19.10-arch1-1 ... x86_64 GNU/Linux)

Problem

The build fails with message:

Downloading from "https://github.com/deislabs/oras/releases/download/v0.12.0/oras_0.12.0_windows_amd64.tar.gz" to "/home/lukas/repo/FHIR-Converter/bin/oras_win_amd64.tar.gz" (4,209,301 bytes).
  cp: cannot stat '../../bin/oras.exe': No such file or directory

Steps to reproduce

git clone git@github.com:microsoft/FHIR-Converter.git
cd FHIR-Converter/src/Microsoft.Health.Fhir.TemplateManagement
dotnet build .

Expected Behavior

Build should succeed

Suggested Fix

Editing Line 89 of Microsoft.Health.Fhir.TemplateManagement.csproj from

<Exec Command="tar -xvf $(BinFolder)$(OrasWinTarGzFile) -C $(BinFolder) &amp; $(CopyExecutable) $(BinFolder)oras.exe ." />

to

<Exec Command="tar -xvf $(BinFolder)$(OrasWinTarGzFile) -C $(BinFolder) &amp;&amp; $(CopyExecutable) $(BinFolder)oras.exe ." />

fixes the issue locally.

Possible explanation

A single ampersand (&amp;) in the linux shell is the operator to execute a command in the background. I think what was intended here was to first unpack and then copy the file. The linux shell operator to run a command once another one finishes successfully is && (&amp;&amp;). So what happens here is that the unpack command is executed in the background and once that command started, it is attempted to copy the not yet unpacked file, creating the error above.

I am not sure, if the double ampersand might break something for building on Microsoft Windows, since I do not really know my way around Windows too much.
If there is something I can do, other than forking the project and changing it myself, I am open for suggestions.

I wish all of you a great day!

@irenepjoseph irenepjoseph added the bug Something isn't working label Oct 5, 2022
sowu880 added a commit that referenced this issue Oct 27, 2022
* Update README.md

* Create HL7v2-templates.md

* Create HL7v2-FHIRValidator.md

* Create HL7v2-ImportantPoints.md

* Update README.md

* Update README.md

Updated STU3-R4 information for OSS FHIR Server

* Fix StyleCop Dependency (#397)

- Fix build-time dependency on StyleCop.Analyzers to no longer force consumers to use the same analyzers

* Bump Newtonsoft.Json in /src/Microsoft.Health.Fhir.TemplateManagement

Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](JamesNK/Newtonsoft.Json@12.0.3...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Newtonsoft.Json from 12.0.3 to 13.0.1 in src/Microsoft.Health.Fhir.TemplateManagement/Microsoft.Health.Fhir.Liquid.Converter.nuspec

* Exclude data folder

* Update the GeoPol

* Update version

* Remove StyleCop from Nuspec (#410)

- Remove StyleCop from the nuspec to prevent forcing consumers to import StyleCop

* Prepare new release for 5.0.3 (#413)

* Fix more than 3 digits for milliseconds in datetime (#409)

* fix

* fix

* Update version to 5.0.3 (#412)

Co-authored-by: sowu880 <57981365+sowu880@users.noreply.github.com>

* Add NJsonSchema dependency to nuspec file (#423)

* Prepare new release for 5.0.5 (#425)

* Update version to 5.0.5 (#424)

* Interface to convert JObject (#416)

* build: Insert missing ampersand

* build: Fix bin-folder creation

* build: fix mkdir command for windows

* build: unfix mkdir command for windows

* build: remove double binfolder

* build: Ignore error in folder creation

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: yankunhuang-pku <66581117+yankunhuang-pku@users.noreply.github.com>
Co-authored-by: ginalee-dotcom <68250213+ginalee-dotcom@users.noreply.github.com>
Co-authored-by: sowu880 <57981365+sowu880@users.noreply.github.com>
Co-authored-by: Irene Joseph <90474712+irenepjoseph@users.noreply.github.com>
Co-authored-by: Qiwei Jin <qiwjin@microsoft.com>
Co-authored-by: Will Sugarman <will.sugarman@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yankun Huang <yankhuan@microsoft.com>
Co-authored-by: Yue Fei <yufei@microsoft.com>
Co-authored-by: Will Sugarman <will.sugarman@microsoft.com>
Co-authored-by: QuanWanxx <68055742+QuanWanxx@users.noreply.github.com>
@sowu880
Copy link
Contributor

sowu880 commented Oct 27, 2022

Thanks for your contribution, your PR #433 is currently merged into dotliquid branch and will be merge in main branch in the next release.

@sowu880 sowu880 closed this as completed Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants