Closed spontaneouscombustion closed 6 months ago
Deploy a function with variables set on appwrite.json using appwrite cli appwrite.json
{ "projectId": "ProjectID", "projectName": "ProjectName", "functions": [ { "$id": "FunctionID", "name": "AdminUtil", "runtime": "node-18.0", "execute": [ "any" ], "events": [], "schedule": "", "timeout": 15, "enabled": true, "logging": true, "entrypoint": "src/main.js", "commands": "npm install", "ignore": [ "node_modules", ".npm" ], "path": "functions/admin", "variables": { "APITOKEN": "REDACTED" } } ], ...
I thinks this has something to do with this line https://github.com/appwrite/sdk-for-cli/blob/ead5533796ccfd5d1bbedb50e7bf65d2b0c1337f/lib/commands/deploy.js#L313C24-L313C39 using remoteVariables.length property in a statement even though remoteVariables is undefined
a successful deploy with the env variables defined/updated
The deployment fail. The log reports "remoteVariables is not defined"
Appwrite Cloud
Linux
cloud.appwrite.io Runtime: Node.js 18
Closing as a duplicate of https://github.com/appwrite/sdk-for-cli/issues/112
π Reproduction steps
Deploy a function with variables set on appwrite.json using appwrite cli appwrite.json
I thinks this has something to do with this line https://github.com/appwrite/sdk-for-cli/blob/ead5533796ccfd5d1bbedb50e7bf65d2b0c1337f/lib/commands/deploy.js#L313C24-L313C39 using remoteVariables.length property in a statement even though remoteVariables is undefined
π Expected behavior
a successful deploy with the env variables defined/updated
π Actual Behavior
The deployment fail. The log reports "remoteVariables is not defined"
π² Appwrite version
Appwrite Cloud
π» Operating system
Linux
𧱠Your Environment
cloud.appwrite.io Runtime: Node.js 18
π Have you spent some time to check if this issue has been raised before?
π’ Have you read the Code of Conduct?