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

🚀 Feature: Give a hint to where you should run init and deploy commands #87

Closed
2 tasks done
stnguyen90 opened this issue Aug 2, 2023 · 9 comments · Fixed by appwrite/sdk-generator#720
Closed
2 tasks done
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@stnguyen90
Copy link
Contributor

🔖 Feature description

appwrite init [subcommand] and appwrite deploy [subcommand] need to be executed in a folder that contains an appwrite.json file so that that file can be used for the init and deploy, but if you run it from a directory that doesn't contain the file, you might get a cryptic error message like:

$ appwrite deploy function
✗ Error No functions found in the current directory.

🎤 Pitch

The init and deploy commands should check for an appwrite.json file and if it doesn't exist, provide an error:

appwrite.json file not found. Please run this command in a folder with an appwrite.json file.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90
Copy link
Contributor Author

@gewenyu99, suggestions on the error?

@stnguyen90 stnguyen90 added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 2, 2023
@adarshjhaa100
Copy link

Hi, if it's not assigned I'd like to work on this issue

@gewenyu99
Copy link

@gewenyu99, suggestions on the error?

✗ Error: No appwrite.json file found in the current directory. This command must be run in the folder holding your appwrite.json file. Please run this command again in the folder containing your appwrite.json file, or run [command to init appwrite.json].

@stnguyen90 how's this?

@stnguyen90
Copy link
Contributor Author

@adarshjhaa100, assigned! Thanks for your interest! 🙏🏼

@adarshjhaa100
Copy link

@stnguyen90 I have replaced the error message for the appwrite deploy [subcommand] for all of the available components where I observed the cryptic message ( function, collection, bucket, team ) e.g.:

image

But, for the appwrite init [subcommand], it displays the following error message which seems to be appropriate to me:
✗ Error Project is not set. Please run appwrite init project to initialize the current directory with an Appwrite project.

Do let me know if anything needs to be changed here and I'll make them before raising the PR.

@stnguyen90
Copy link
Contributor Author

But, for the appwrite init [subcommand], it displays the following error message which seems to be appropriate to me: ✗ Error Project is not set. Please run appwrite init project to initialize the current directory with an Appwrite project.

That sounds reasonable. Go ahead and submit the PR.

@adarshjhaa100
Copy link

adarshjhaa100 commented Sep 22, 2023

@stnguyen90 I'll raise a PR for this in the SDK Generator within a couple of days.

@adarshjhaa100
Copy link

@stnguyen90 Have made the changes and raised the PR to SDK generator with attached test cases. Do let me know if there's any issue with the PR and I'll promptly fix and reply.

@adarshjhaa100
Copy link

adarshjhaa100 commented Oct 18, 2023

@stnguyen90 pushed the latest changes to this PR: appwrite/sdk-generator#720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants