/Users/username/.iterm2_shell_integration.zsh: line 36: syntax error near unexpected token `}'
/Users/username/.iterm2_shell_integration.zsh: line 36: ` }'`
In Appium there is a method io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:157)
if (StringUtils.isBlank(instancePath) || !(defaultAppiumNode =
new File(instancePath + File.separator
+ APPIUM_FOLDER)).exists()) {
String errorOutput = commandLine.getStdOut();
throw new InvalidServerInstanceException(ERROR_NODE_NOT_FOUND,
new IOException(errorOutput));
}
When executed in a test, this method executed my zsh shell integration script for some reason (maybe related to an Appium bug) and found
/Users/username/.iterm2_shell_integration.zsh: line 36: syntax error near unexpected token `}'
/Users/username/.iterm2_shell_integration.zsh: line 36: ` }'`
So my tests failed.
The ShellCheck Plugin found suggested "You need at least one command here. Use 'true;' as a no-op. when I analyzed the script and reported it as a syntax error.
So finally, the method should look like this:
# Users can write their own version of this method. It should call
# iterm2_set_user_var but not produce any other output.
# e.g., iterm2_set_user_var currentDirectory $PWD
# Accessible in iTerm2 (in a badge now, elsewhere in the future) as
# \(user.currentDirectory).
whence -v iterm2_print_user_vars > /dev/null 2>&1
if [ $? -ne 0 ]; then
iterm2_print_user_vars() { true;}
fi
Also, is there a reason we don't want a shebang at the top?
In Appium there is a method
io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:157)
When executed in a test, this method executed my zsh shell integration script for some reason (maybe related to an Appium bug) and found
So my tests failed.
The ShellCheck Plugin found suggested
"You need at least one command here. Use 'true;' as a no-op.
when I analyzed the script and reported it as a syntax error.So finally, the method should look like this:
Also, is there a reason we don't want a shebang at the top?