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

cargo concordium init does not work if non-empty concordium-contracts-common folder exists #22

Open
Bargsteen opened this issue Jan 5, 2023 · 1 comment
Labels
[Type] Bug Something isn't working

Comments

@Bargsteen
Copy link
Contributor

Bug Description

cargo concordium init does not work if non-empty concordium-contracts-common folder exists.

Steps to Reproduce

  1. Create a non-empty folder named concordium-contracts-common: mkdir concordium-contracts-common; touch concordium-contracts-common/a.txt
  2. Run cargo concordium init

Expected Result
The wizard starts correctly:

❯ cargo concordium init
? 🤷   Which template should be expanded? ›
❯ cis2-nft
  default

Actual Result
The wizard cannot run:

❯ cargo concordium init
Error: Please check if the Git user / repository exists.

Caused by:
    'concordium-contracts-common' exists and is not an empty directory; class=Invalid (3); code=Exists (-4)
Error: Could not create a new Concordium smart contract project.

Caused by:
    Could not use the template to initialize the project.

Versions

  • Software Version: cargo concordium 2.5.0
  • OS: macOS
@Bargsteen Bargsteen added the [Type] Bug Something isn't working label Jan 5, 2023
@abizjak
Copy link
Contributor

abizjak commented Jan 5, 2023

This is fundamentally a bug in cargo generate and further it is actually a bug in its dependency (libgit2/libgit2#5830)

I have reported a bug to cargo-generate with a suggested workaround cargo-generate/cargo-generate#839

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

No branches or pull requests

2 participants