-
Notifications
You must be signed in to change notification settings - Fork 7
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
Weird behavior chaining multiple commands using && #22
Comments
Lines 37 to 39 in a59619f
So, your commands are expanded to: %~dp0\\msys64\\usr\\bin\\bash.exe -ilc "cd $OLDPWD && bash -c cd build/3.0/gmake && make config=release"
%~dp0\\msys64\\usr\\bin\\bash.exe -ilc "cd $OLDPWD && bash -c ls && cd build/3.0/gmake && make config=release" As you see, |
I see. How do I chain those commands using && then? |
|
I thought so, too, but Maybe some extra quoting is required? |
I think that there's something else going on there. I just tried: - run: msys2do "pwd && cd .github && pwd"
- run: msys2do "pwd; cd .github; pwd"
- run: |
cd .github
msys2do pwd
So, either the first or the last syntaxes work. The second one does only execute the first pwd, which is expected. |
Could |
I suggest to replace |
Note that neither |
I'm in the base directory as if |
So, the issue seems to be related to the slashes? https://github.com/1138-4EB/wxFormBuilder/runs/327961332#step:12:11 |
Which slashes do you mean? I think that your example works because of the |
Yes, you are correct. It is currently not supported to use |
Thank you so much for the support :) I'm using the build script approach now. |
You are welcome! I hope that actions/toolkit#232 will eventually get some attention from engineers at GitHub, so that we can use #21. Otherwise (if args need to be processed twice, once by a |
Not sure if this is the problem here, but try "set CHERE_INVOKING=yes", which makes bash keep the current working directory when executing the passed command. |
@lazka, I'm afraid it's unrelated. |
I'm trying to port an AppVeyor script for wxFormBuilder to GitHub Actions. I've noticed that chaining a
cd
command with another one won't actually change the working directory. Only if I also addls &&
at the front: wxFormBuilder/wxFormBuilder@c05b987I'm not really sure what's going on there, do you have an idea?
The text was updated successfully, but these errors were encountered: