Run CI for #2244 - #2245
Merged
Merged
Conversation
meta_measure.rb built the EnergyPlus command as a single string, so Ruby's system() ran it through /bin/sh. Two consequences: - Weather file paths containing shell metacharacters were mangled. The path is interpolated inside double quotes, but , backticks and are still expanded by the shell, so EnergyPlus received a different path than the one on disk and any embedded command substitution executed. - The workflow could not run in containers without a shell, such as distroless images. system() fails silently there, returning nil with empty stdout/stderr energyplus logs and no error message. Build the command as an array and splat it into system() instead, which exec's EnergyPlus directly. The weather path is passed as a single inert argument, so the manual quoting is no longer needed. Redirection, working directory and return value semantics are unchanged. Adds a workflow test that runs a simulation with a weather file whose name contains a command substitution, asserting both that EnergyPlus completes and that the embedded command does not run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
[description here]
Checklist
Not all may apply:
EPvalidator.sch) has been updatedopenstudio tasks.rb update_hpxmls)HPXMLtoOpenStudio/tests/test*.rband/orworkflow/tests/test*.rb)openstudio tasks.rb update_measureshas been run