Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default function directory to the current working directory instead of root #77

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

hdp617
Copy link
Contributor

@hdp617 hdp617 commented Aug 19, 2019

This was the default before introducing the --source flag. Making root ('/') the default breaks existing projects if users don't specify --source.

@grant grant merged commit ac28899 into master Aug 22, 2019
@grant grant deleted the fix-code-location branch August 22, 2019 23:34
hdp617 added a commit that referenced this pull request Sep 13, 2019
… 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.
hdp617 added a commit that referenced this pull request Sep 13, 2019
* 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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants