Skip to content

Commit

Permalink
Check for /usr/bin/bash if /bin/bash not found in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-cogliati-inl committed Sep 21, 2017
1 parent 1600321 commit bc221d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion framework/Models/Code.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,12 @@ def findMsys():
if beginExecutable.startswith("/"):
beginExecutable = beginExecutable.lstrip("/")
winExecutable = os.path.join(msysDir, beginExecutable)
self.raiseAMessage("winExecutable" + winExecutable)
self.raiseAMessage("winExecutable " + winExecutable)
if not os.path.exists(winExecutable) and not os.path.exists(winExecutable + ".exe") and winExecutable.endswith("bash"):
#msys64 stores bash in /usr/bin/bash instead of /bin/bash, so try that
maybeWinExecutable = winExecutable.replace("bin/bash","usr/bin/bash")
if os.path.exists(maybeWinExecutable) or os.path.exists(maybeWinExecutable + ".exe"):
winExecutable = maybeWinExecutable
realExecutable[0] = winExecutable
else:
self.raiseAWarning("Could not find msys in "+os.getcwd())
Expand Down

0 comments on commit bc221d9

Please sign in to comment.