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

Nice error message if go.mod does not contain dependencies #52

Open
johanneskastl opened this issue Jul 16, 2024 · 0 comments
Open

Nice error message if go.mod does not contain dependencies #52

johanneskastl opened this issue Jul 16, 2024 · 0 comments

Comments

@johanneskastl
Copy link

I would propose that the service errors out with a useful message instead of this if the go.mod file does not have any dependencies in it:

Example: https://github.com/minio/certgen/blob/main/go.mod

module github.com/minio/certgen

go 1.21
INFO:obs-service-go_modules:Vendor go.mod dependencies to vendor.tar.gz
Traceback (most recent call last):
  File "/usr/lib/obs/service/go_modules", line 322, in <module>
    main()
  File "/usr/lib/obs/service/go_modules", line 315, in main
    new_archive.add_files(vendor_dir)
  File "/usr/lib/python3.11/site-packages/libarchive/write.py", line 84, in add_files
    r = read_next_header2(read_p, entry_p)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/libarchive/ffi.py", line 98, in check_int
    raise archive_error(args[0], retcode)
libarchive.exception.ArchiveError: vendor: Cannot stat (errno=2, retcode=-25, archive_p=94160168216544)

(The output was achieved when using the modified service from #51, otherwise it never reaches the actual go step)

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

No branches or pull requests

1 participant