@@ -17,7 +17,7 @@ const { systemHasCommand, isPortTaken, getAllFiles } = require('../utils');
17
17
const { runtimeNames, systemTools, JwtManager, Queue } = require('../emulation/utils');
18
18
const { dockerStop, dockerCleanup, dockerStart, dockerBuild, dockerPull } = require('../emulation/docker');
19
19
20
- const runFunction = async ({ port, functionId, noVariables , noReload, userId } = {}) => {
20
+ const runFunction = async ({ port, functionId, withVariables , noReload, userId } = {}) => {
21
21
// Selection
22
22
if(!functionId) {
23
23
const answers = await inquirer.prompt(questionsRunFunctions[0]);
@@ -115,7 +115,7 @@ const runFunction = async ({ port, functionId, noVariables, noReload, userId } =
115
115
const userVariables = {};
116
116
const variables = {};
117
117
118
- if(!noVariables ) {
118
+ if(withVariables ) {
119
119
try {
120
120
const { variables: remoteVariables } = await paginate(functionsListVariables, {
121
121
functionId: func['$id'],
@@ -127,7 +127,7 @@ const runFunction = async ({ port, functionId, noVariables, noReload, userId } =
127
127
userVariables[v.key] = v.value;
128
128
});
129
129
} 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);
131
131
}
132
132
}
133
133
@@ -184,7 +184,7 @@ const runFunction = async ({ port, functionId, noVariables, noReload, userId } =
184
184
const ignorer = ignore();
185
185
ignorer.add('.appwrite');
186
186
ignorer.add('code.tar.gz');
187
-
187
+
188
188
if (func.ignore) {
189
189
ignorer.add(func.ignore);
190
190
} else if (fs.existsSync(path.join(functionPath, '.gitignore'))) {
321
321
.option(`--function-id <function -id >`, `ID of function to run`)
322
322
.option(`--port <port >`, `Local port`)
323
323
.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`)
325
325
.option(`--no-reload`, `Prevent live reloading of server when changes are made to function files`)
326
326
.action(actionRunner(runFunction));
327
327
0 commit comments