Skip to content

Commit 7235cff

Browse files
author
alanbchristie
committed
- Adjusted PIN/POUT for execution in bash from Windows
1 parent 4916ea2 commit 7235cff

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Additional modules we depend on.
22
# Required from within an RDKIT Conda environment
33

4-
matplotlib == 2.1.1
54
molvs == 0.0.9
65
standardiser == 0.1.9

src/groovy/ShellExecutor.groovy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ class ShellExecutor {
4343

4444
StringBuilder sout = new StringBuilder()
4545
StringBuilder serr = new StringBuilder()
46+
47+
// Windows hack?
48+
String osName = System.properties['os.name']
49+
if (osName.startsWith('Win')) {
50+
pin = pin.replace('\\', '/')
51+
pin = pin.replace('C:', '/c')
52+
pout = pout.replace('\\', '/')
53+
pout = pout.replace('C:', '/c')
54+
}
55+
4656
// Append '/' to PIN and POUT to allow '${POUT}output'
4757
String cmd = "PIN=$pin/; POUT=$pout/; " + command
4858
def proc = ['sh', '-c', cmd].execute(null, edir)

0 commit comments

Comments
 (0)