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

get_docopts.sh fails with "unrecognized option '--ignore-missing'" #56

Open
stephenchu opened this issue Nov 19, 2021 · 2 comments
Open
Labels
waiting for user Some suggestion has been made in the issue, please give some feedback.

Comments

@stephenchu
Copy link

On my macOS, it works; but on my linux, get_docopts.sh (from script) fails with:

Saving to: ‘docopts_linux_amd64’

100%[==================================================================================================================================================================================================================================================================================================================================>] 1,949,696   --.-K/s   in 0.04s

2021-11-19 14:51:33 (41.8 MB/s) - ‘docopts_linux_amd64’ saved [1949696/1949696]

docopts_linux_amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
verifying sha256sum signature from https://github.com/docopt/docopts/releases/download/v0.6.3-rc2/sha256sum.txt ...
sha256sum: unrecognized option '--ignore-missing'
Try 'sha256sum --help' for more information.
› sha256sum --help
Usage: sha256sum [OPTION]... [FILE]...
Print or check SHA256 (256-bit) checksums.
With no FILE, or when FILE is -, read standard input.

  -b, --binary         read in binary mode
  -c, --check          read SHA256 sums from the FILEs and check them
      --tag            create a BSD-style checksum
  -t, --text           read in text mode (default)
  Note: There is no difference between binary and text mode option on GNU system.

The following four options are useful only when verifying checksums:
      --quiet          don't print OK for each successfully verified file
      --status         don't output anything, status code shows success
      --strict         exit non-zero for improperly formatted checksum lines
  -w, --warn           warn about improperly formatted checksum lines

      --help     display this help and exit
      --version  output version information and exit

The sums are computed as described in FIPS-180-2.  When checking, the input
should be a former output of this program.  The default mode is to print
a line with checksum, a character indicating input mode ('*' for binary,
space for text), and name for each FILE.

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'sha256sum invocation'
› sha256sum --version
sha256sum (GNU coreutils) 8.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Ulrich Drepper, Scott Miller, and David Madore.
› uname -a
Linux host.redacted.com 4.14.123-111.109.amzn2.x86_64 #1 SMP Mon Jun 10 19:37:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
@Sylvain303
Copy link
Collaborator

hi @stephenchu,

According to https://lists.gnu.org/archive/html/coreutils-announce/2013-12/msg00000.html

sha256sum (GNU coreutils) 8.22 seems quite old.

I used --ignore-missing just because this make the code simpler.

which version and distribution of Linux it is?

Could you try those commands from both your system?

wget https://github.com/docopt/docopts/releases/download/v0.6.3-rc2/docopts_linux_amd64 -O docopts_linux_amd64
wget https://github.com/docopt/docopts/releases/download/v0.6.3-rc2/sha256sum.txt -O sha256sum.txt
grep docopts_linux_amd64 sha256sum.txt | sha256sum --check -

I could rewrite the code this way to make it more compatible with older Linux version.

Let me know if it works.

@Sylvain303 Sylvain303 added the waiting for user Some suggestion has been made in the issue, please give some feedback. label Apr 22, 2022
@Sylvain303
Copy link
Collaborator

hi @stephenchu

Did you have a chance to test the suggested command?
Could you also answer the question on which Linux platform it was failing?

Or you could close the issue, if it's not relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for user Some suggestion has been made in the issue, please give some feedback.
Projects
None yet
Development

No branches or pull requests

2 participants