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

Test on macOS: tar: Option --to-command=... is not supported #188

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 30, 2024

Opening as a bug report, also happens when running tox -e py312 locally on macOS:

=================================== FAILURES ===================================
_____________________ test_check_doc_unreleased_version_ok _____________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x1061f9d30>
tmp_path = PosixPath('/private/var/folders/g6/rgtlsw6n123b0gt5483s5_cm0000gn/T/pytest-of-runner/pytest-0/test_check_doc_unreleased_vers2')

    def test_check_doc_unreleased_version_ok(monkeypatch, tmp_path: Path) -> None:
        prepare_fake_docs(
            tmp_path,
            "<div>New in 3.13</div>",
        )
        db = {
            "release": Tag("3.13.0rc1"),
            "git_repo": str(tmp_path),
        }
>       run_release.check_doc_unreleased_version(cast(ReleaseShelf, db))

tests/test_run_release.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
run_release.py:582: in check_doc_unreleased_version
    if not ask_question("Are these `(unreleased)` strings in built docs OK?"):
run_release.py:258: in ask_question
    answer = input("Enter yes or no: ")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <_pytest.capture.DontReadFromInput object at 0x103ce[45](https://github.com/hugovk/release-tools/actions/runs/11601299635/job/32303698930#step:5:46)60>, size = -1

    def read(self, size: int = -1) -> str:
>       raise OSError(
            "pytest: reading from stdin while output is captured!  Consider using `-s`."
        )
E       OSError: pytest: reading from stdin while output is captured!  Consider using `-s`.

.tox/py/lib/python3.12/site-packages/_pytest/capture.py:205: OSError
----------------------------- Captured stdout call -----------------------------
Checking built docs for '(unreleased)'
Are these `(unreleased)` strings in built docs OK?
Enter yes or no: 
----------------------------- Captured stderr call -----------------------------
tar: Option --to-command=! grep -Hn --label="$TAR_FILENAME" "[(]unreleased[)]" is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
which tar
/usr/bin/tartar --version
bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8

https://man.freebsd.org/cgi/man.cgi?bsdtar(1) has no mention of --to-command.

However, GNU tar does have --to-command, which is presumably the GNU/Linux one:

https://www.gnu.org/software/tar/manual/html_node/Writing-to-an-External-Program.html

This was added in #164, cc @encukou.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant