@@ -17,7 +17,7 @@ const { systemHasCommand, isPortTaken, getAllFiles } = require('../utils');
1717const { runtimeNames, systemTools, JwtManager, Queue } = require('../emulation/utils');
1818const { dockerStop, dockerCleanup, dockerStart, dockerBuild, dockerPull } = require('../emulation/docker');
1919
20- const runFunction = async ({ port, functionId, noVariables , noReload, userId } = {}) => {
20+ const runFunction = async ({ port, functionId, withVariables , noReload, userId } = {}) => {
2121 // Selection
2222 if(!functionId) {
2323 const answers = await inquirer.prompt(questionsRunFunctions[0]);
@@ -115,7 +115,7 @@ const runFunction = async ({ port, functionId, noVariables, noReload, userId } =
115115 const userVariables = {};
116116 const variables = {};
117117
118- if(!noVariables ) {
118+ if(withVariables ) {
119119 try {
120120 const { variables: remoteVariables } = await paginate(functionsListVariables, {
121121 functionId: func['$id'],
@@ -127,7 +127,7 @@ const runFunction = async ({ port, functionId, noVariables, noReload, userId } =
127127 userVariables[v.key] = v.value;
128128 });
129129 } catch(err) {
130- warn("Remote variables not fetched. Production environment variables will not be avaiable . Reason: " + err.message);
130+ warn("Remote variables not fetched. Production environment variables will not be available . Reason: " + err.message);
131131 }
132132 }
133133
@@ -184,7 +184,7 @@ const runFunction = async ({ port, functionId, noVariables, noReload, userId } =
184184 const ignorer = ignore();
185185 ignorer.add('.appwrite');
186186 ignorer.add('code.tar.gz');
187-
187+
188188 if (func.ignore) {
189189 ignorer.add(func.ignore);
190190 } else if (fs.existsSync(path.join(functionPath, '.gitignore'))) {
321321 .option(`--function-id <function -id >`, `ID of function to run`)
322322 .option(`--port <port >`, `Local port`)
323323 .option(`--user-id <user -id >`, `ID of user to impersonate`)
324- .option(`--no -variables`, `Prevent pulling variables from function settings`)
324+ .option(`--with -variables`, `Run with function variables from function settings`)
325325 .option(`--no-reload`, `Prevent live reloading of server when changes are made to function files`)
326326 .action(actionRunner(runFunction));
327327
0 commit comments