Skip to content

Commit 21037bf

Browse files
committed
Update python text to look friendlier
Closes #15
1 parent 4f2d908 commit 21037bf

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/main/java/org/scijava/plugins/scripting/python/RebuildEnvironment.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ public void run() {
111111
// Build the new environment.
112112
try {
113113
Builder builder = Appose.file(environmentYaml, "environment.yml")
114-
.subscribeOutput(this::report).subscribeError(this::report)
114+
.subscribeOutput(this::reportMsg).subscribeError(this::reportErr)
115115
.subscribeProgress((msg, cur, max) -> Splash.update(msg, (double) cur /
116116
max));
117+
117118
// HACK: stderr stream triggers console window show.
118-
System.err.println("Building Python environment");
119+
System.err.println();
120+
log.info("Building Python environment");
119121
Splash.show();
120122
builder.build(targetDir);
121123
// Notify user of success
@@ -130,8 +132,13 @@ public void run() {
130132
}
131133
}
132134

133-
private void report(String s) {
135+
private void reportErr(String s) {
136+
if (s.isEmpty()) System.err.print(".");
137+
else log.error(s);
138+
}
139+
140+
private void reportMsg(String s) {
134141
if (s.isEmpty()) System.err.print(".");
135-
else System.err.print(s);
142+
else log.info(s);
136143
}
137144
}

0 commit comments

Comments
 (0)