mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 15:10:27 +00:00
Add .shellcheckrc
This commit is contained in:
14
.shellcheckrc
Normal file
14
.shellcheckrc
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# ShellCheck configuration
|
||||||
|
# https://github.com/koalaman/shellcheck/blob/HEAD/shellcheck.1.md#rc-files
|
||||||
|
|
||||||
|
# See also:
|
||||||
|
# https://www.shellcheck.net/wiki/Optional
|
||||||
|
# https://google.github.io/styleguide/shellguide.html
|
||||||
|
|
||||||
|
# https://www.shellcheck.net/wiki/SC2292
|
||||||
|
# https://google.github.io/styleguide/shellguide.html#s6.3-tests
|
||||||
|
enable=require-double-brackets
|
||||||
|
|
||||||
|
# https://www.shellcheck.net/wiki/SC2250
|
||||||
|
# https://google.github.io/styleguide/shellguide.html#s5.6-variable-expansion
|
||||||
|
enable=require-variable-braces
|
||||||
6
main.sh
6
main.sh
@@ -123,8 +123,8 @@ cargo_binstall() {
|
|||||||
# As a result, http will be disabled, and it will also set
|
# As a result, http will be disabled, and it will also set
|
||||||
# min tls version to be 1.2
|
# min tls version to be 1.2
|
||||||
case "${version}" in
|
case "${version}" in
|
||||||
latest) cargo binstall --force --secure --no-confirm "$tool" ;;
|
latest) cargo binstall --force --secure --no-confirm "${tool}" ;;
|
||||||
*) cargo binstall --force --secure --no-confirm --version "$version" "$tool" ;;
|
*) cargo binstall --force --secure --no-confirm --version "${version}" "${tool}" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ case "${OSTYPE}" in
|
|||||||
cygwin* | msys*) exe=".exe" ;;
|
cygwin* | msys*) exe=".exe" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cargo_bin="${CARGO_HOME:-"$HOME/.cargo"}/bin"
|
cargo_bin="${CARGO_HOME:-"${HOME}/.cargo"}/bin"
|
||||||
if [[ ! -d "${cargo_bin}" ]]; then
|
if [[ ! -d "${cargo_bin}" ]]; then
|
||||||
cargo_bin=/usr/local/bin
|
cargo_bin=/usr/local/bin
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user