Commit 2800649
authored
fix: use empty string path when function source is not specified (#90)
* fix: use empty string path when --source flag and FUNCTION_SOURCE env var are not specified
I removed '/' from CODE_LOCATION that set the default function directory to root in commit #77. This causes this error in 1.3.0,
```
npx @google-cloud/functions-framework --target=helloWorld
The "path" argument must be of type string. Received type undefined
```
When --source flag and FUNCTION_SOURCE env var are not specified, one of the 'path' arguments in resolve() is undefined. This causes the error above.
I've added empty string as an argument in the case above. This should fix the bug.
* fix: remove redundant process.cwd in resolve()1 parent 15f6abf commit 2800649
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
0 commit comments