Skip to content

Commit a114c01

Browse files
author
Felix Garcia Borrego
authored
Use the command env-vars-file instead of env-var-file. (#45)
As defined in the docs, the command should be '--env-vars-file' https://cloud.google.com/functions/docs/env-var Running the original code we just get Error: ` unrecognized arguments: --env-var-file=ci-env.yaml (did you mean '--env-vars-file'?)`
1 parent 9543382 commit a114c01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

invoker/function-maven-plugin/src/main/java/com/google/cloud/functions/plugin/DeployFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public List<String> getCommands() {
329329
commands.add("--set-env-vars=" + mapJoiner.join(environmentVariables));
330330
}
331331
if (envVarsFile != null) {
332-
commands.add("--env-var-file=" + envVarsFile);
332+
commands.add("--env-vars-file=" + envVarsFile);
333333
}
334334
commands.add("--runtime=" + runtime);
335335

invoker/function-maven-plugin/src/test/java/com/google/cloud/functions/plugin/DeployFunctionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void testDeployFunctionCommandLine() {
4848
"--vpc-connector=a connector",
4949
"--max-instances=3",
5050
"--set-env-vars=env1=a,env2=b",
51-
"--env-var-file=myfile",
51+
"--env-vars-file=myfile",
5252
"--runtime=java11");
5353
assertThat(mojo.getCommands()).isEqualTo(expected);
5454
}

0 commit comments

Comments
 (0)