Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Conversation

@tbarlow12
Copy link
Contributor

Not able to repro ENOENT error yet, but this PR should help with debugging.

  • Inject current environment variables to spawned process (most importantly, PATH so that an executable can be found)
  • Add additional log statements on errors for debugging purposes

See this stack overflow answer for more details.

@coveralls
Copy link

coveralls commented Jul 29, 2019

Coverage Status

Coverage increased (+0.1%) to 84.329% when pulling c6c582f on tabarlow/fix-spawn into 1df392c on dev.

Copy link
Contributor

@wbreza wbreza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

const env = {
// Inherit environment from current process, most importantly, the PATH
...process.env,
// Override any custom environment variables from serverless configuration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this saying custom env variables will override yml or vice versa?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The env variables from serverless.yml are king :)

@tbarlow12 tbarlow12 merged commit eda7b64 into dev Aug 2, 2019
@tbarlow12 tbarlow12 deleted the tabarlow/fix-spawn branch August 2, 2019 18:15
tbarlow12 added a commit that referenced this pull request Sep 13, 2019
Add current process environment variables to spawned process, inherit `stdio` for spawned process, append `.cmd` if windows
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants