[go: up one dir, main page]

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

Fix #5108 - quote call to ExpandObjects for paths with spaces #5109

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

jmarrec
Copy link
Collaborator
@jmarrec jmarrec commented Mar 12, 2024

Pull request overview

ln -sf /Applications/EnergyPlus-23-2-0 "energy plus2320"
export ENERGYPLUS_EXE_PATH="$(pwd)/energy plus2320/energyplus"
openstudio run --style-stdout --show-stdout -w workflow.osw

Before:

sh: /Users/julien/Downloads/temp/5108/energy: No such file or directory
[openstudio.workflow.OSWorkflow] <Warn> ExpandObjects returned a non-zero exit code (32512).

After:

$ "/Users/julien/Downloads/temp/test os380fix/bin/openstudio" run --style-stdout --show-stdout -w workflow.osw

ExpandObjects Started.
No expanded file generated.
ExpandObjects Finished. Time:     0.014

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

@@ -157,7 +157,7 @@ void OSWorkflow::runEnergyPlus() {
// TODO: workflow-gem was manually running expandObjects prior to the potential serialization to json
// Should we rather pass -x to the E+ cmd line?
if (!workflowJSON.runOptions()->skipExpandObjects()) {
const std::string cmd = openstudio::toString(runDirResults.expandObjectsExe.native());
const std::string cmd = fmt::format("\"{}\"", openstudio::toString(runDirResults.expandObjectsExe.native()));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expandObjectsExe is infered from getEnergyPlusDirectory which uses getEnergyPlusExecutable which will use ENERGYPLUS_EXE_PATH (as long as it's not running from the build dir)

@jmarrec jmarrec added the Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. label Mar 12, 2024
@jmarrec
Copy link
Collaborator Author
jmarrec commented Mar 12, 2024

@chriswmackey binary is above

@chriswmackey
Copy link

Thanks, @jmarrec .
Clicking on the .exe doesn't seem to start the download for me. Is there something that I'm missing here?

@chriswmackey
Copy link

Nevermind. I think it was just a bothersome security feature in Chrome that was not letting my download executables from addresses that didn't start with https. I have the exe now.

@jmarrec jmarrec merged commit 171ca2b into develop Mar 13, 2024
4 of 6 checks passed
@jmarrec jmarrec deleted the 5108-quote_ExpandObjects branch March 13, 2024 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - CLI component - Workflow Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. severity - Normal Bug
Projects
None yet
3 participants