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

Error message when package repo is dirty #28

Closed
baggepinnen opened this issue Feb 22, 2021 · 2 comments
Closed

Error message when package repo is dirty #28

baggepinnen opened this issue Feb 22, 2021 · 2 comments

Comments

@baggepinnen
Copy link

Thanks for this awesome package! I just started using it and noticed that there is an error message when the repo to a package I'm trying to register is dirty. This is very welcome! However, the message says that the registry is dirty rather than the package I'm registering:

julia> register("ClampingID", "CbRegistry")
ERROR: Package directory is dirty. Stash or commit files.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33

maybe the message could indicate if it's the package or the registry being dirty?

@GunnarFarneback
Copy link
Owner

I believe these lines do so:

# If the package directory is dirty, a different version could be
# present in Project.toml.
if is_dirty(package_path, gitconfig)
error("Package directory is dirty. Stash or commit files.")
end
registry_path = find_registry_path(registry, pkg)
if is_dirty(registry_path, gitconfig)
error("Registry directory is dirty. Stash or commit files.")
end

@baggepinnen
Copy link
Author

Wow, I must have been very tired or something, even the message I reproduced in the issue says "package is dirty". I'm sorry for the noise 😕

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

2 participants