Skip to content

Another includePaths bug #55

Description

@srg-clearlaunch

Hi - Isn't this a bug in the includePaths?
https://github.com/serverless/serverless-optimizer-plugin/blob/master/index.js#L288

Shouldn't it be something like:

let destDir  = (fs.lstatSync(path.join(_this.evt.options.pathDist,p)).isDirectory()) ? destPath : path.dirname(destPath);

That way optimizer will actually find the intended include? If you just use the includePath as written in the s-function then lstat won't find it because its looking for a full path right? (http://linux.die.net/man/2/lstat)

Changing to the above allows a successful deploy for me

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions