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

Check if directory already exists in graph init when directory is entered #1857

Open
schmidsi opened this issue Dec 18, 2024 · 1 comment
Open

Comments

@schmidsi
Copy link
Contributor

schmidsi commented Dec 18, 2024

Following walk through:

graph init
 ›   Warning: In next major version, this flag will be removed. By default we will
 ›   stop initializing a Git repository.
✔ Network · Base Mainnet · base · https://base.blockscout.com
✔ Source · Smart Contract · ethereum
✔ Subgraph slug · blonde-subgraph
✔ Directory to create the subgraph in · blonde-subgraph
✔ Contract address · 0x28BC44F9754f590DA1564C1A7bA35F8E1d1B134A
✔ Fetching ABI from contract API...
✔ Fetching start block from contract API...
✔ Fetching contract name from contract API...
✔ Start block · 22855106
✔ Contract name · Blonde
✔ Index contract events as entities (Y/n) · true
✖ Directory already exists, do you want to initialize the subgraph here (files will be overwritten) ? (y/N) · false

n ›   Error: no error?

I'd expect that in step "Directory to create the subgraph in" it would check if that directory exists and give a warning, not at the end.

Also, the "Error: no error?" is a bit a weird ending.

@YaroShkvorets
Copy link
Collaborator

@schmidsi can you think of a use case where you would answer "yes" to that question?

I think I would prefer to just disallow using existing directory and accept only the one that doesn't exist.

@YaroShkvorets YaroShkvorets moved this to 🔖 Next in Tooling Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Next
Development

No branches or pull requests

2 participants