Skip to content

Traceback when targeting a file that doesn't exist #497

@ericwb

Description

@ericwb

Describe the bug
Traceback when targeting a file that doesn't exist.

To Reproduce
Steps to reproduce the behavior:

  1. Run .tox/py312/bin/precli ../setup.py (Note: ../setup.py file doesn't exist)
  2. See error
Erics-MacBook-Pro-2:precli ericwb$ .tox/py312/bin/precli ../setup.py
Traceback (most recent call last):
  File "/Users/ericwb/workspace/precli/.tox/py312/bin/precli", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/ericwb/workspace/precli/precli/cli/main.py", line 351, in main
    run.invoke()
  File "/Users/ericwb/workspace/precli/precli/core/run.py", line 187, in invoke
    with open(artifact.file_name, "rb") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../setup.py'

Expected behavior
No tracebacks

Version

precli 0.5.5.dev28
Copyright 2024 Secure Sauce LLC
License BUSL-1.1: Business Source License 1.1 <https://spdx.org/licenses/BUSL-1.1.html>
  Python 3.12.2 (main, May 13 2024, 16:18:42) [Clang 15.0.0 (clang-1500.3.9.4)]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions