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

[BUG] Handle local cargo installs better #169

Closed
jayvdb opened this issue Mar 18, 2021 · 2 comments
Closed

[BUG] Handle local cargo installs better #169

jayvdb opened this issue Mar 18, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jayvdb
Copy link

jayvdb commented Mar 18, 2021

Describe the bug
Installing a path of . shouldnt be registered as '.'.

To Reproduce

cargo install --path .
  Installing emplace v1.3.1-alpha.0 (/Users/john.vandenberg/osx/emplace)
    Updating crates.io index
   Compiling libc v0.2.89
   Compiling proc-macro2 v1.0.24
....
    Replaced package `emplace v1.3.0` with `emplace v1.3.1-alpha.0 (/Users/john.vandenberg/osx/emplace)` (executable `emplace`)
Opening Emplace repo: "/Users/john.vandenberg/Library/Application Support/emplace".
Mirror this command?
- . (Cargo Rust)
[y/n]

Expected behavior
Dont try to register '.' as an installable, or expand . to be a complete path, and even better would be to determine the git repo and hash to make it reproducible.

Desktop (please complete the following information):

  • OS: mac
  • Shell: zsh

Machine information

Software version

emplace 1.3.1-alpha.0

Operating system

Darwin 20.3.0

Environment variables

SHELL=/usr/local/bin/zsh
EMPLACE_CONFIG='/Users/john.vandenberg/Library/Application Support/emplace.toml'

Git version

> git --version
git version 2.31.0

Compile time information

  • Profile: release
  • Target triple: x86_64-apple-darwin
  • Family: unix
  • OS: macos
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2,sse3,ssse3
  • Host: x86_64-apple-darwin
@jayvdb jayvdb added the bug Something isn't working label Mar 18, 2021
@jayvdb
Copy link
Author

jayvdb commented Mar 18, 2021

A more vague pip example found via history import:

[ ] requirements.txt (Python Pip)

There, the name requirements.txt could actually be a valid PyPI name, so simply doing heuristics on package name wouldnt suffice, however it would be a great first implementation.

@tversteeg
Copy link
Owner

I've added a heuristic that ignores packages that start with a special character. The requirements.txt for Python is a bit of a different case, I think I'll need to have a blacklist for each package manager for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants