Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script fails when fish is the default shell on remote machine #43

Closed
ghostbuster91 opened this issue Dec 29, 2016 · 7 comments
Closed

Comments

@ghostbuster91
Copy link
Contributor

No description provided.

@artem-zinnatullin
Copy link
Contributor

Any logs?

@arturdryomov
Copy link
Contributor

@arturdryomov
Copy link
Contributor

I heard that fish is not POSIX compliant (LOL). Probably shabang in the script is not enough and we must execute bash mainframer.sh explicitly.

@artem-zinnatullin
Copy link
Contributor

I believe rsync will solve this as well, @ghostbuster91 please try 1.1.0 (will be released soon) and report back.

@ghostbuster91
Copy link
Contributor Author

ghostbuster91 commented Dec 29, 2016

Thanks for quick replay.
Here is the error msg:

Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
fish: set -xe && cd ~/el-peon-android/ && ./gradlew compileDebugUnitTestSources mockableAndroidJar

There are two problems with this command.

  1. Fish does not support && for concatenation. Instead to be both fish and bash compatible you might want to use ; character to separate commands.
  2. The set command looks different in fish.

I think that the best solution would be to explicitly invoke these commands in bash shell, because supporting many shells might be cumbersome.
E.g. like this:

# Build project on a remote machine.
ssh $REMOTE_BUILD_MACHINE "echo 'set -xe && cd ~/$PROJECT_DIR_NAME/ && $BUILD_COMMAND' | bash"

@artem-zinnatullin
Copy link
Contributor

artem-zinnatullin commented Dec 29, 2016 via email

@artem-zinnatullin
Copy link
Contributor

Closed by #44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants