You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throw new Error("No collections found in the current directory. Run `{{ language.params.executableName }} init collection` to fetch all your collections.");
message: "Which collections would you like to deploy?",
310
312
choices: () => {
311
313
let collections = localConfig.getCollections();
314
+
checkDeployConditions(localConfig)
315
+
312
316
if (collections.length === 0) {
313
317
throw new Error("No collections found in the current directory. Run `{{ language.params.executableName }} init collection` to fetch all your collections.");
Copy file name to clipboardExpand all lines: templates/cli/lib/utils.js.twig
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,13 @@ function getAllFiles(folder) {
14
14
return files;
15
15
}
16
16
17
+
const checkDeployConditions = (localConfig) => {
18
+
if (Object.keys(localConfig.data).length === 0) {
19
+
throw new 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 appwrite init project.");
0 commit comments