Skip to content

Commit e2fc4c1

Browse files
authored
Merge pull request #167 from ctrueden/python-on-macos
Use python3 rather than python on macOS
2 parents 45b9d71 + 9f4ccdf commit e2fc4c1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/test/java/org/janelia/saalfeldlab/n5/http/RunnerWithHttpServer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ private void logHttpOutput() {
133133
public void startHttpServer() throws Exception {
134134

135135
httpServerDirectory = createTmpServerDirectory();
136-
ProcessBuilder processBuilder = new ProcessBuilder("python", "-m", "http.server");
136+
final String osName = System.getProperty("os.name");
137+
final String pythonBinary = "Mac OS X".equals(osName) ? "python3" : "python";
138+
ProcessBuilder processBuilder = new ProcessBuilder(pythonBinary, "-m", "http.server");
137139
processBuilder.directory(httpServerDirectory.toFile());
138140
processBuilder.redirectErrorStream(true);
139141
process = processBuilder.start();

0 commit comments

Comments
 (0)