Skip to content

Directories detected as lockfiles #1177

Open

Description

@kylewillmon

Lockfile detection believes that directories might be lockfiles.

How To Reproduce

> mkdir requirements.txt

> ls
requirements.txt

> phylum parse
Generating lockfile for manifest "./requirements.txt" using Pip…
❗ Error: Lockfile generation failed! For details, see: https://docs.phylum.io/docs/lockfile-generation

Caused by:
    package manager exited with error code 1:

    ERROR: Could not open requirements file: [Errno 21] Is a directory: '/path/to/requirements.txt'

This error message isn't very helpful....

> mkdir Cargo.lock

> phylum parse
❗ Error: Is a directory (os error 21)

Activity

  1. added
    bugSomething isn't working
    low priorityShould be handled as time permits
    on Aug 8, 2023
  2. added 2 commits that reference this issue on Aug 17, 2023
    a56ff06
    c2800b8
  3. self-assigned this
    on Aug 17, 2023
  4. cd-work commented on Aug 18, 2023

    @cd-work
    Contributor

    #1202 as a solution was discarded, since even checking for !is_directory still causes syscalls to lookup metadata for every lockfile, even if it doesn't cause failure for the GitHub App. Since this has never caused any issues in practice, there's no reason to slow down the GitHub App.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglow priorityShould be handled as time permits

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions