Skip to content

Run CI for #2244 - #2245

Merged
shorowit merged 2 commits into
masterfrom
exec-energyplus-without-shell
Aug 3, 2026
Merged

Run CI for #2244#2245
shorowit merged 2 commits into
masterfrom
exec-energyplus-without-shell

Conversation

@shorowit

@shorowit shorowit commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Pull Request Description

[description here]

Checklist

Not all may apply:

  • Schematron validator (EPvalidator.sch) has been updated
  • Sample files have been added/updated (openstudio tasks.rb update_hpxmls)
  • Tests have been added/updated (e.g., HPXMLtoOpenStudio/tests/test*.rb and/or workflow/tests/test*.rb)
  • Documentation has been updated
  • Changelog has been updated
  • openstudio tasks.rb update_measures has been run
  • No unexpected changes to simulation results of sample files

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.
@shorowit
shorowit marked this pull request as ready for review August 3, 2026 16:16
@shorowit
shorowit merged commit a0136fc into master Aug 3, 2026
@shorowit
shorowit deleted the exec-energyplus-without-shell branch August 3, 2026 16:17
@github-project-automation github-project-automation Bot moved this from Triage to Done in OpenStudio-HPXML Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants