-
Notifications
You must be signed in to change notification settings - Fork 3
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
Alpine/macOS で md5s が動かない #25
Labels
bug
Something isn't working
Comments
#shellcheck shell=bash
# md5s は md5sum/md5 のラッパー関数です.
md5s() {
- if [ -e md5sum ]; then
- echo "$1" | md5sum
- elif [ -e md5 ]; then
+ if [ -e "$(which md5sum)" ]; then
+ echo "$1" | md5sum | awk '{ print $1 }'
+ elif [ -e "$(which md5)" ]; then
md5 -q -s "$1"
fi
}
Describe 'md5s'
It 'should return MD5 hash of the arg 1'
When call md5s 'hoge'
The output should equal 'c59548c3c576228486a1f0037eb16a1b'
The status should be success
End
End $ shellspec --shell '/bin/bash' ./tests/md5s_test.sh
Running: /bin/bash [bash 5.1.0(1)-release]
.
Finished in 0.48 seconds (user 0.21 seconds, sys 0.08 seconds)
1 example, 0 failures |
This was referenced May 31, 2021
Merged
emadurandal
pushed a commit
to guncys/QiiCipher
that referenced
this issue
Jun 1, 2021
KEINOS
pushed a commit
that referenced
this issue
Jun 1, 2021
* Add checkkeylength command * Add links of checkkeylength's code to README.md * Fix the md5s function for Mac - See #25 * Add the 'checkkeylength' script
PR #25 で修正されているので Close します。何かあったら、再オープンよろです。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR #5 の md5sum/md5 のラッパー関数が空の値を返します。
if [ -e md5sum ]
でコマンドの検知に失敗しているようです。The text was updated successfully, but these errors were encountered: