-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Fix the experimental_run_shell_command example. #16286
Fix the experimental_run_shell_command example. #16286
Conversation
1) The double-braces are incorrect, should be single braces (perhaps this used to be used as input for interplation?) 2) Use `find` instead of `tree` as many systems do not have the latter by default. Note that we may also want to remove this example entirely, as `testprojects/` is intended to be a home for inputs to integration tests. So either we should either write a test that uses this, or remove it. [ci skip-rust] [ci skip-build-wheels]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just dropping the extra brace leaves the chroot placeholder hanging, no?
@@ -21,6 +21,6 @@ files(name="sources_directory", sources=["sources/**/*"]) | |||
|
|||
experimental_run_shell_command( | |||
name="cmd", | |||
command='{{ tree {chroot}; echo "in: $CHROOT"; }} | tee output.log', | |||
command='{ find {chroot} -type f; echo "in: $CHROOT"; } | tee output.log', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is not going through formatting, then the {chroot}
part is hardly correct either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All I know is, it works (on macos and linux) without the double braces and does not work with them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we use string replace to replace {chroot}
with the chroot path, not a call to format()
:
*value = value.replace("{chroot}", chroot_path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oohh... that would explain it.
1) The double-braces are incorrect, should be single braces (perhaps this used to be used as input for interplation?) 2) Use `find` instead of `tree` as many systems do not have the latter by default. Note that we may also want to remove this example entirely, as `testprojects/` is intended to be a home for inputs to integration tests. So either we should either write a test that uses this, or remove it. [ci skip-rust] [ci skip-build-wheels]
(perhaps this used to be used as input for interplation?)
find
instead oftree
as many systems do not have thelatter by default.
Note that
testprojects/
is intended to be a home for inputs tointegration tests. So possibly we should either write a test that
uses this example, or remove it.
[ci skip-rust]
[ci skip-build-wheels]