Script output has mysterious trailing characters when executed in a specific environment
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
I'm working on a project that requires the use of a test framework called Appium in Java. The Appium library is attempting to run the following script on my machine to find out where my NodeJS install is located (not important that it is node):
#!bin/sh
OUTPUT="$(npm root -g)"
echo "$OUTPUT"
exit
This script is executed during my JUnit unit tests in Java explicitly with bash. See this link to see the code that Appium uses to run the script. On my system, if I execute this from a shell (using zsh, bash, or sh), I get the following output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
Great. For some reason, when that same script is running in the environment that is set up by my IDE (IntelliJ), this is the output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
[H[2J
Regardless of whether or not this was a good idea on the part of Appium, its breaking because of the extra rrn[H[2J
. I usually launch IntelliJ through a program called GnomeDO on Ubuntu MATE. After seeing that my $PATH
in IntelliJ was different at run time than what I expected, I closed it out and launched it form my shell instead. The $PATH
was right and the trailing output stopped.
What can be different about launching an application from my desktop environment in Linux and launching it from my shell that would lead to trailing non-readable characters?
linux bash mate intellij
 |Â
show 5 more comments
up vote
-1
down vote
favorite
I'm working on a project that requires the use of a test framework called Appium in Java. The Appium library is attempting to run the following script on my machine to find out where my NodeJS install is located (not important that it is node):
#!bin/sh
OUTPUT="$(npm root -g)"
echo "$OUTPUT"
exit
This script is executed during my JUnit unit tests in Java explicitly with bash. See this link to see the code that Appium uses to run the script. On my system, if I execute this from a shell (using zsh, bash, or sh), I get the following output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
Great. For some reason, when that same script is running in the environment that is set up by my IDE (IntelliJ), this is the output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
[H[2J
Regardless of whether or not this was a good idea on the part of Appium, its breaking because of the extra rrn[H[2J
. I usually launch IntelliJ through a program called GnomeDO on Ubuntu MATE. After seeing that my $PATH
in IntelliJ was different at run time than what I expected, I closed it out and launched it form my shell instead. The $PATH
was right and the trailing output stopped.
What can be different about launching an application from my desktop environment in Linux and launching it from my shell that would lead to trailing non-readable characters?
linux bash mate intellij
2
Those characters look like the control character sequence for moving cursor to top left of a terminal window and clearing the screen. Tryecho -e 'e[He[2J'
from a shell and you'll see what I mean. Don't know if that will help identify the cause but...
â B Layer
Nov 5 '17 at 3:09
1
That should probably read "escape sequence" rather than "control character sequence" but you get my drift. en.wikipedia.org/wiki/Escape_sequence
â B Layer
Nov 5 '17 at 3:20
Where is that displaying? Intellij is opening a terminal window of some kind? Is it a new window or embedded in the IDE? I see a few mentions about some Gnome terminals not handling some escape sequences correctly so perhaps when launching with DO you get one of those terminals instead of one that handles them correctly.
â B Layer
Nov 5 '17 at 3:33
Based on the new information in your edit Gnome DO is not relevant at all. But parts of my answer still have relevance. I'd like to hear whether a different terminal is used when running the script directly vs when Intellij launches it. If they are the same then what happens when you execute theecho
command I specified in that terminal?
â B Layer
Nov 5 '17 at 23:26
@BLayer As for "where is that displaying", all of this information came from debugging unit tests in IntelliJ's debugger. I had to actually step through line by line, see the output of the Appium shell execution saved as a Java variable, see.trim()
do nothing because it didn't end in whitespace, etc.
â Anthony Naddeo
Nov 6 '17 at 2:10
 |Â
show 5 more comments
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I'm working on a project that requires the use of a test framework called Appium in Java. The Appium library is attempting to run the following script on my machine to find out where my NodeJS install is located (not important that it is node):
#!bin/sh
OUTPUT="$(npm root -g)"
echo "$OUTPUT"
exit
This script is executed during my JUnit unit tests in Java explicitly with bash. See this link to see the code that Appium uses to run the script. On my system, if I execute this from a shell (using zsh, bash, or sh), I get the following output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
Great. For some reason, when that same script is running in the environment that is set up by my IDE (IntelliJ), this is the output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
[H[2J
Regardless of whether or not this was a good idea on the part of Appium, its breaking because of the extra rrn[H[2J
. I usually launch IntelliJ through a program called GnomeDO on Ubuntu MATE. After seeing that my $PATH
in IntelliJ was different at run time than what I expected, I closed it out and launched it form my shell instead. The $PATH
was right and the trailing output stopped.
What can be different about launching an application from my desktop environment in Linux and launching it from my shell that would lead to trailing non-readable characters?
linux bash mate intellij
I'm working on a project that requires the use of a test framework called Appium in Java. The Appium library is attempting to run the following script on my machine to find out where my NodeJS install is located (not important that it is node):
#!bin/sh
OUTPUT="$(npm root -g)"
echo "$OUTPUT"
exit
This script is executed during my JUnit unit tests in Java explicitly with bash. See this link to see the code that Appium uses to run the script. On my system, if I execute this from a shell (using zsh, bash, or sh), I get the following output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
Great. For some reason, when that same script is running in the environment that is set up by my IDE (IntelliJ), this is the output:
/home/me/node-v8.9.0-linux-x64/lib/node_modules
[H[2J
Regardless of whether or not this was a good idea on the part of Appium, its breaking because of the extra rrn[H[2J
. I usually launch IntelliJ through a program called GnomeDO on Ubuntu MATE. After seeing that my $PATH
in IntelliJ was different at run time than what I expected, I closed it out and launched it form my shell instead. The $PATH
was right and the trailing output stopped.
What can be different about launching an application from my desktop environment in Linux and launching it from my shell that would lead to trailing non-readable characters?
linux bash mate intellij
edited Feb 7 at 19:42
asked Nov 5 '17 at 2:47
Anthony Naddeo
995
995
2
Those characters look like the control character sequence for moving cursor to top left of a terminal window and clearing the screen. Tryecho -e 'e[He[2J'
from a shell and you'll see what I mean. Don't know if that will help identify the cause but...
â B Layer
Nov 5 '17 at 3:09
1
That should probably read "escape sequence" rather than "control character sequence" but you get my drift. en.wikipedia.org/wiki/Escape_sequence
â B Layer
Nov 5 '17 at 3:20
Where is that displaying? Intellij is opening a terminal window of some kind? Is it a new window or embedded in the IDE? I see a few mentions about some Gnome terminals not handling some escape sequences correctly so perhaps when launching with DO you get one of those terminals instead of one that handles them correctly.
â B Layer
Nov 5 '17 at 3:33
Based on the new information in your edit Gnome DO is not relevant at all. But parts of my answer still have relevance. I'd like to hear whether a different terminal is used when running the script directly vs when Intellij launches it. If they are the same then what happens when you execute theecho
command I specified in that terminal?
â B Layer
Nov 5 '17 at 23:26
@BLayer As for "where is that displaying", all of this information came from debugging unit tests in IntelliJ's debugger. I had to actually step through line by line, see the output of the Appium shell execution saved as a Java variable, see.trim()
do nothing because it didn't end in whitespace, etc.
â Anthony Naddeo
Nov 6 '17 at 2:10
 |Â
show 5 more comments
2
Those characters look like the control character sequence for moving cursor to top left of a terminal window and clearing the screen. Tryecho -e 'e[He[2J'
from a shell and you'll see what I mean. Don't know if that will help identify the cause but...
â B Layer
Nov 5 '17 at 3:09
1
That should probably read "escape sequence" rather than "control character sequence" but you get my drift. en.wikipedia.org/wiki/Escape_sequence
â B Layer
Nov 5 '17 at 3:20
Where is that displaying? Intellij is opening a terminal window of some kind? Is it a new window or embedded in the IDE? I see a few mentions about some Gnome terminals not handling some escape sequences correctly so perhaps when launching with DO you get one of those terminals instead of one that handles them correctly.
â B Layer
Nov 5 '17 at 3:33
Based on the new information in your edit Gnome DO is not relevant at all. But parts of my answer still have relevance. I'd like to hear whether a different terminal is used when running the script directly vs when Intellij launches it. If they are the same then what happens when you execute theecho
command I specified in that terminal?
â B Layer
Nov 5 '17 at 23:26
@BLayer As for "where is that displaying", all of this information came from debugging unit tests in IntelliJ's debugger. I had to actually step through line by line, see the output of the Appium shell execution saved as a Java variable, see.trim()
do nothing because it didn't end in whitespace, etc.
â Anthony Naddeo
Nov 6 '17 at 2:10
2
2
Those characters look like the control character sequence for moving cursor to top left of a terminal window and clearing the screen. Try
echo -e 'e[He[2J'
from a shell and you'll see what I mean. Don't know if that will help identify the cause but...â B Layer
Nov 5 '17 at 3:09
Those characters look like the control character sequence for moving cursor to top left of a terminal window and clearing the screen. Try
echo -e 'e[He[2J'
from a shell and you'll see what I mean. Don't know if that will help identify the cause but...â B Layer
Nov 5 '17 at 3:09
1
1
That should probably read "escape sequence" rather than "control character sequence" but you get my drift. en.wikipedia.org/wiki/Escape_sequence
â B Layer
Nov 5 '17 at 3:20
That should probably read "escape sequence" rather than "control character sequence" but you get my drift. en.wikipedia.org/wiki/Escape_sequence
â B Layer
Nov 5 '17 at 3:20
Where is that displaying? Intellij is opening a terminal window of some kind? Is it a new window or embedded in the IDE? I see a few mentions about some Gnome terminals not handling some escape sequences correctly so perhaps when launching with DO you get one of those terminals instead of one that handles them correctly.
â B Layer
Nov 5 '17 at 3:33
Where is that displaying? Intellij is opening a terminal window of some kind? Is it a new window or embedded in the IDE? I see a few mentions about some Gnome terminals not handling some escape sequences correctly so perhaps when launching with DO you get one of those terminals instead of one that handles them correctly.
â B Layer
Nov 5 '17 at 3:33
Based on the new information in your edit Gnome DO is not relevant at all. But parts of my answer still have relevance. I'd like to hear whether a different terminal is used when running the script directly vs when Intellij launches it. If they are the same then what happens when you execute the
echo
command I specified in that terminal?â B Layer
Nov 5 '17 at 23:26
Based on the new information in your edit Gnome DO is not relevant at all. But parts of my answer still have relevance. I'd like to hear whether a different terminal is used when running the script directly vs when Intellij launches it. If they are the same then what happens when you execute the
echo
command I specified in that terminal?â B Layer
Nov 5 '17 at 23:26
@BLayer As for "where is that displaying", all of this information came from debugging unit tests in IntelliJ's debugger. I had to actually step through line by line, see the output of the Appium shell execution saved as a Java variable, see
.trim()
do nothing because it didn't end in whitespace, etc.â Anthony Naddeo
Nov 6 '17 at 2:10
@BLayer As for "where is that displaying", all of this information came from debugging unit tests in IntelliJ's debugger. I had to actually step through line by line, see the output of the Appium shell execution saved as a Java variable, see
.trim()
do nothing because it didn't end in whitespace, etc.â Anthony Naddeo
Nov 6 '17 at 2:10
 |Â
show 5 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
Note: I've been theorizing in the comments and this captures those thoughts and a HIGHLY speculative conclusion.
The funky characters look suspiciously like the escape sequence that moves the cursor to the top (top-left?) of a terminal and then clears the screen. You can see this in action by doing this in a shell: echo -e 'e[He[2J'
.
I did a little searching and found a few references to Gnome terminals having incomplete support for escape sequences and for the problem sequences characters looking just like ours (e.g. [H
) are displayed
Combining those two facts leads to a theory:
- Intellij emits some escape sequences upon opening a terminal window to clean the window up including
e[He[2J
. - Gnome DO sets up an environment that points to a particular terminal type and this is different from the terminal you use normally.
- Intellij launches this terminal when it is launched from DO, emits escape sequences, then runs your script.
Ah but why does the escape sequence come after the output of the script. That does not necessarily mean that it was printed after the script output was printed. There could be other escape sequences emitted by Intellij that worked and they could have moved the cursor in such a way to make the lines appear seemingly out of sequence.
Again this is extreme speculation made without having all the facts...but see if you can find a Gnome terminal on your system that doesn't handle the echo
command above or otherwise check my guess.
The world wants you to clean your screen. Also, read that script carefully. (-:
â JdeBP
Nov 5 '17 at 9:58
@JdeBP Afraid I'm not catching your meaning...either with the linked answer or your comment about the script. The script isn't really important for my theory/guess. What's important is that some escape chars are being processed correctly in one case and not in the other case. If you've identified some important data points please clarify.
â B Layer
Nov 5 '17 at 13:16
I just updated the second paragraph with a link to the source code that Appium uses to execute the script. It happens each time I run a unit test so it isn't an IDE startup thing. They also explicitly execute the script with bash (despite having put thesh
shebang...). I do find that escape sequence very interesting though, I didn't know that. That's the kind of thing I was hoping to learn from this post too so thank you.
â Anthony Naddeo
Nov 5 '17 at 16:55
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Note: I've been theorizing in the comments and this captures those thoughts and a HIGHLY speculative conclusion.
The funky characters look suspiciously like the escape sequence that moves the cursor to the top (top-left?) of a terminal and then clears the screen. You can see this in action by doing this in a shell: echo -e 'e[He[2J'
.
I did a little searching and found a few references to Gnome terminals having incomplete support for escape sequences and for the problem sequences characters looking just like ours (e.g. [H
) are displayed
Combining those two facts leads to a theory:
- Intellij emits some escape sequences upon opening a terminal window to clean the window up including
e[He[2J
. - Gnome DO sets up an environment that points to a particular terminal type and this is different from the terminal you use normally.
- Intellij launches this terminal when it is launched from DO, emits escape sequences, then runs your script.
Ah but why does the escape sequence come after the output of the script. That does not necessarily mean that it was printed after the script output was printed. There could be other escape sequences emitted by Intellij that worked and they could have moved the cursor in such a way to make the lines appear seemingly out of sequence.
Again this is extreme speculation made without having all the facts...but see if you can find a Gnome terminal on your system that doesn't handle the echo
command above or otherwise check my guess.
The world wants you to clean your screen. Also, read that script carefully. (-:
â JdeBP
Nov 5 '17 at 9:58
@JdeBP Afraid I'm not catching your meaning...either with the linked answer or your comment about the script. The script isn't really important for my theory/guess. What's important is that some escape chars are being processed correctly in one case and not in the other case. If you've identified some important data points please clarify.
â B Layer
Nov 5 '17 at 13:16
I just updated the second paragraph with a link to the source code that Appium uses to execute the script. It happens each time I run a unit test so it isn't an IDE startup thing. They also explicitly execute the script with bash (despite having put thesh
shebang...). I do find that escape sequence very interesting though, I didn't know that. That's the kind of thing I was hoping to learn from this post too so thank you.
â Anthony Naddeo
Nov 5 '17 at 16:55
add a comment |Â
up vote
1
down vote
Note: I've been theorizing in the comments and this captures those thoughts and a HIGHLY speculative conclusion.
The funky characters look suspiciously like the escape sequence that moves the cursor to the top (top-left?) of a terminal and then clears the screen. You can see this in action by doing this in a shell: echo -e 'e[He[2J'
.
I did a little searching and found a few references to Gnome terminals having incomplete support for escape sequences and for the problem sequences characters looking just like ours (e.g. [H
) are displayed
Combining those two facts leads to a theory:
- Intellij emits some escape sequences upon opening a terminal window to clean the window up including
e[He[2J
. - Gnome DO sets up an environment that points to a particular terminal type and this is different from the terminal you use normally.
- Intellij launches this terminal when it is launched from DO, emits escape sequences, then runs your script.
Ah but why does the escape sequence come after the output of the script. That does not necessarily mean that it was printed after the script output was printed. There could be other escape sequences emitted by Intellij that worked and they could have moved the cursor in such a way to make the lines appear seemingly out of sequence.
Again this is extreme speculation made without having all the facts...but see if you can find a Gnome terminal on your system that doesn't handle the echo
command above or otherwise check my guess.
The world wants you to clean your screen. Also, read that script carefully. (-:
â JdeBP
Nov 5 '17 at 9:58
@JdeBP Afraid I'm not catching your meaning...either with the linked answer or your comment about the script. The script isn't really important for my theory/guess. What's important is that some escape chars are being processed correctly in one case and not in the other case. If you've identified some important data points please clarify.
â B Layer
Nov 5 '17 at 13:16
I just updated the second paragraph with a link to the source code that Appium uses to execute the script. It happens each time I run a unit test so it isn't an IDE startup thing. They also explicitly execute the script with bash (despite having put thesh
shebang...). I do find that escape sequence very interesting though, I didn't know that. That's the kind of thing I was hoping to learn from this post too so thank you.
â Anthony Naddeo
Nov 5 '17 at 16:55
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Note: I've been theorizing in the comments and this captures those thoughts and a HIGHLY speculative conclusion.
The funky characters look suspiciously like the escape sequence that moves the cursor to the top (top-left?) of a terminal and then clears the screen. You can see this in action by doing this in a shell: echo -e 'e[He[2J'
.
I did a little searching and found a few references to Gnome terminals having incomplete support for escape sequences and for the problem sequences characters looking just like ours (e.g. [H
) are displayed
Combining those two facts leads to a theory:
- Intellij emits some escape sequences upon opening a terminal window to clean the window up including
e[He[2J
. - Gnome DO sets up an environment that points to a particular terminal type and this is different from the terminal you use normally.
- Intellij launches this terminal when it is launched from DO, emits escape sequences, then runs your script.
Ah but why does the escape sequence come after the output of the script. That does not necessarily mean that it was printed after the script output was printed. There could be other escape sequences emitted by Intellij that worked and they could have moved the cursor in such a way to make the lines appear seemingly out of sequence.
Again this is extreme speculation made without having all the facts...but see if you can find a Gnome terminal on your system that doesn't handle the echo
command above or otherwise check my guess.
Note: I've been theorizing in the comments and this captures those thoughts and a HIGHLY speculative conclusion.
The funky characters look suspiciously like the escape sequence that moves the cursor to the top (top-left?) of a terminal and then clears the screen. You can see this in action by doing this in a shell: echo -e 'e[He[2J'
.
I did a little searching and found a few references to Gnome terminals having incomplete support for escape sequences and for the problem sequences characters looking just like ours (e.g. [H
) are displayed
Combining those two facts leads to a theory:
- Intellij emits some escape sequences upon opening a terminal window to clean the window up including
e[He[2J
. - Gnome DO sets up an environment that points to a particular terminal type and this is different from the terminal you use normally.
- Intellij launches this terminal when it is launched from DO, emits escape sequences, then runs your script.
Ah but why does the escape sequence come after the output of the script. That does not necessarily mean that it was printed after the script output was printed. There could be other escape sequences emitted by Intellij that worked and they could have moved the cursor in such a way to make the lines appear seemingly out of sequence.
Again this is extreme speculation made without having all the facts...but see if you can find a Gnome terminal on your system that doesn't handle the echo
command above or otherwise check my guess.
answered Nov 5 '17 at 4:00
B Layer
3,9241525
3,9241525
The world wants you to clean your screen. Also, read that script carefully. (-:
â JdeBP
Nov 5 '17 at 9:58
@JdeBP Afraid I'm not catching your meaning...either with the linked answer or your comment about the script. The script isn't really important for my theory/guess. What's important is that some escape chars are being processed correctly in one case and not in the other case. If you've identified some important data points please clarify.
â B Layer
Nov 5 '17 at 13:16
I just updated the second paragraph with a link to the source code that Appium uses to execute the script. It happens each time I run a unit test so it isn't an IDE startup thing. They also explicitly execute the script with bash (despite having put thesh
shebang...). I do find that escape sequence very interesting though, I didn't know that. That's the kind of thing I was hoping to learn from this post too so thank you.
â Anthony Naddeo
Nov 5 '17 at 16:55
add a comment |Â
The world wants you to clean your screen. Also, read that script carefully. (-:
â JdeBP
Nov 5 '17 at 9:58
@JdeBP Afraid I'm not catching your meaning...either with the linked answer or your comment about the script. The script isn't really important for my theory/guess. What's important is that some escape chars are being processed correctly in one case and not in the other case. If you've identified some important data points please clarify.
â B Layer
Nov 5 '17 at 13:16
I just updated the second paragraph with a link to the source code that Appium uses to execute the script. It happens each time I run a unit test so it isn't an IDE startup thing. They also explicitly execute the script with bash (despite having put thesh
shebang...). I do find that escape sequence very interesting though, I didn't know that. That's the kind of thing I was hoping to learn from this post too so thank you.
â Anthony Naddeo
Nov 5 '17 at 16:55
The world wants you to clean your screen. Also, read that script carefully. (-:
â JdeBP
Nov 5 '17 at 9:58
The world wants you to clean your screen. Also, read that script carefully. (-:
â JdeBP
Nov 5 '17 at 9:58
@JdeBP Afraid I'm not catching your meaning...either with the linked answer or your comment about the script. The script isn't really important for my theory/guess. What's important is that some escape chars are being processed correctly in one case and not in the other case. If you've identified some important data points please clarify.
â B Layer
Nov 5 '17 at 13:16
@JdeBP Afraid I'm not catching your meaning...either with the linked answer or your comment about the script. The script isn't really important for my theory/guess. What's important is that some escape chars are being processed correctly in one case and not in the other case. If you've identified some important data points please clarify.
â B Layer
Nov 5 '17 at 13:16
I just updated the second paragraph with a link to the source code that Appium uses to execute the script. It happens each time I run a unit test so it isn't an IDE startup thing. They also explicitly execute the script with bash (despite having put the
sh
shebang...). I do find that escape sequence very interesting though, I didn't know that. That's the kind of thing I was hoping to learn from this post too so thank you.â Anthony Naddeo
Nov 5 '17 at 16:55
I just updated the second paragraph with a link to the source code that Appium uses to execute the script. It happens each time I run a unit test so it isn't an IDE startup thing. They also explicitly execute the script with bash (despite having put the
sh
shebang...). I do find that escape sequence very interesting though, I didn't know that. That's the kind of thing I was hoping to learn from this post too so thank you.â Anthony Naddeo
Nov 5 '17 at 16:55
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402582%2fscript-output-has-mysterious-trailing-characters-when-executed-in-a-specific-env%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Those characters look like the control character sequence for moving cursor to top left of a terminal window and clearing the screen. Try
echo -e 'e[He[2J'
from a shell and you'll see what I mean. Don't know if that will help identify the cause but...â B Layer
Nov 5 '17 at 3:09
1
That should probably read "escape sequence" rather than "control character sequence" but you get my drift. en.wikipedia.org/wiki/Escape_sequence
â B Layer
Nov 5 '17 at 3:20
Where is that displaying? Intellij is opening a terminal window of some kind? Is it a new window or embedded in the IDE? I see a few mentions about some Gnome terminals not handling some escape sequences correctly so perhaps when launching with DO you get one of those terminals instead of one that handles them correctly.
â B Layer
Nov 5 '17 at 3:33
Based on the new information in your edit Gnome DO is not relevant at all. But parts of my answer still have relevance. I'd like to hear whether a different terminal is used when running the script directly vs when Intellij launches it. If they are the same then what happens when you execute the
echo
command I specified in that terminal?â B Layer
Nov 5 '17 at 23:26
@BLayer As for "where is that displaying", all of this information came from debugging unit tests in IntelliJ's debugger. I had to actually step through line by line, see the output of the Appium shell execution saved as a Java variable, see
.trim()
do nothing because it didn't end in whitespace, etc.â Anthony Naddeo
Nov 6 '17 at 2:10