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

Fix shellcheck error #78666

Merged
merged 4 commits into from
Nov 6, 2020
Merged

Fix shellcheck error #78666

merged 4 commits into from
Nov 6, 2020

Conversation

sasurau4
Copy link
Contributor

@sasurau4 sasurau4 commented Nov 2, 2020

Overview

Helps with #77290

This pr fix only errors of shellcheck, the result of git ls-files '*.sh' | xargs shellcheck --severity=error.

Fixing error are following.

Disable error following.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 2, 2020
@sasurau4 sasurau4 changed the title fix shellcheck error Fix shellcheck error Nov 2, 2020
@sasurau4 sasurau4 marked this pull request as ready for review November 2, 2020 12:59
@pickfire
Copy link
Contributor

pickfire commented Nov 2, 2020

Why /bin/bash? Why not just posix shell? Ah, looks like it is just a partial fix, no wonder not all bash stuff is converted to posix shell.

@jyn514 jyn514 added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Nov 2, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with nit reverted and the shebangs converted to /bin/sh where possible. If the script uses bash features, please convert it to /usr/bin/env bash instead.

src/ci/init_repo.sh Outdated Show resolved Hide resolved
@sasurau4 sasurau4 requested a review from jyn514 November 3, 2020 14:00
@sasurau4
Copy link
Contributor Author

sasurau4 commented Nov 3, 2020

@jyn514 Thanks for review. I revert 5c9db03 and change !#/bin/bash to !#/bin/sh.

@bors

This comment has been minimized.

@sasurau4
Copy link
Contributor Author

sasurau4 commented Nov 4, 2020

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@jyn514
Copy link
Member

jyn514 commented Nov 4, 2020

r=me with commits squashed, I expect the worst that happens from getting the shebang wrong is a syntax error.

@sasurau4
Copy link
Contributor Author

sasurau4 commented Nov 6, 2020

@jyn514 I squashed commits

@jyn514
Copy link
Member

jyn514 commented Nov 6, 2020

@bors r+

Thanks for the PR!

@bors
Copy link
Contributor

bors commented Nov 6, 2020

📌 Commit 5ea028e has been approved by jyn514

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 6, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 6, 2020
Rollup of 15 pull requests

Successful merges:

 - rust-lang#74979 (`#![deny(unsafe_op_in_unsafe_fn)]` in sys/hermit)
 - rust-lang#78006 (Use Intra-doc links for std::io::buffered)
 - rust-lang#78167 (Fix unreachable sub-branch detection in or-patterns)
 - rust-lang#78514 (Allow using 1/2/3/4 for `x.py setup` options)
 - rust-lang#78538 (BTreeMap: document a curious assumption in test cases)
 - rust-lang#78559 (Add LLVM upgrades from 7 to 10 to RELEASES.md)
 - rust-lang#78666 (Fix shellcheck error)
 - rust-lang#78705 (Print a summary of which test suite failed)
 - rust-lang#78726 (Add link to rust website)
 - rust-lang#78730 (Expand explanation of reverse_bits)
 - rust-lang#78760 (`deny(invalid_codeblock_attributes)` for rustc_error_codes)
 - rust-lang#78771 (inliner: Copy unevaluated constants only after successful inlining)
 - rust-lang#78794 (rustc_expand: use collect_bang helper instead of manual reimplementation)
 - rust-lang#78795 (The renumber pass is long gone)
 - rust-lang#78798 (Fixing Spelling Typos)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7931b24 into rust-lang:master Nov 6, 2020
@rustbot rustbot added this to the 1.49.0 milestone Nov 6, 2020
@sasurau4 sasurau4 deleted the fix/shellcheck-error branch November 7, 2020 01:03
else
cargo +${TOOLCHAIN} $cmd $@
cargo +${TOOLCHAIN} $cmd "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have already been fixed https://github.com/bjorn3/rustc_codegen_cranelift/pull/1109, which hasn't been pulled into rust-lang/rust yet. This is going to conflict when I pull it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1,3 +1,4 @@
#!/usr/bin/env bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is deliberately not executable. It is only meant to be sourced.

bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Nov 27, 2020
…n514

Fix shellcheck error

## Overview

Helps with rust-lang#77290

This pr fix only errors of shellcheck, the result of `git ls-files '*.sh' | xargs shellcheck --severity=error`.

Fixing error are following.

- https://github.com/koalaman/shellcheck/wiki/SC2148
- https://github.com/koalaman/shellcheck/wiki/SC1008

Disable error following.
- https://github.com/koalaman/shellcheck/wiki/SC2068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants