Skip to content

Fix missing callback on early return in export-file.js#3356

Open
carterpewpew wants to merge 1 commit into
postmanlabs:developfrom
carterpewpew:fix/missing-callback
Open

Fix missing callback on early return in export-file.js#3356
carterpewpew wants to merge 1 commit into
postmanlabs:developfrom
carterpewpew:fix/missing-callback

Conversation

@carterpewpew
Copy link
Copy Markdown

Summary

  • Fix missing done() callback on early return in lib/run/export-file.js when path validation fails
  • Without the callback, async.each in the run module hangs indefinitely, causing Newman to silently freeze
  • Now returns done() with a descriptive error, ensuring Newman always completes or reports a meaningful error

Test plan

  • Verified that normal export flows (--export-environment, --export-globals, etc.) are unaffected
  • The guard at line 85 only triggers in edge cases (e.g., root path /, or third-party reporters pushing exports without a valid path or default)

The early return in lib/run/export-file.js when path validation fails did not invoke the done() callback, causing async.each in the run module to hang indefinitely. Now returns done() with an error describing the invalid export path, ensuring Newman always completes or reports a meaningful error instead of silently hanging.

Signed-off-by: Jathavedhan M <jathavedhan.m@ibm.com>
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

Successfully merging this pull request may close these issues.

1 participant