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

Handler path with dot in folder can't find handler #242

Closed
Looveh opened this issue Apr 28, 2017 · 4 comments
Closed

Handler path with dot in folder can't find handler #242

Looveh opened this issue Apr 28, 2017 · 4 comments

Comments

@Looveh
Copy link

Looveh commented Apr 28, 2017

If a folder in the multi-folder path to a handler contains a dot the handler won't be found.

Example:

functions:
  my_fn:
    handler: main.out/my_fn.handler"
    events:
      - http:
          path: my_fn
          method: get

Running with:

SLS_DEBUG=* serverless offline --location /path/to/project/

Produces the logs:

...
[offline] Loading handler... (/path/to/project/main)
...

Where it clearly truncates the rest of the handler path after the dot.

This is especially critical in projects where compilation occurs and the target output path may contain dots and can't be controlled outside of the compilation tool.

@balassy
Copy link
Contributor

balassy commented Sep 8, 2017

The bug is in the getFunctionOptions function in the functionHelper.js file. It searches for only the first dot in the handler path instead of the last dot. Very annoying, a fix would be highly appreciated. Thank you.

@akaila
Copy link
Contributor

akaila commented Aug 13, 2018

Pull request #471

@dherault
Copy link
Owner

Merged! v3.25.8

@akaila
Copy link
Contributor

akaila commented Aug 16, 2018

Thanks @dherault !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants