Skip to content

fix: fail Makefile smoke tests on npm packaging errors #7

@TYH71

Description

@TYH71

Problem

make npm-package-test can pass even when npm packaging commands fail.

Observed locally:

  • npm pack --dry-run failed with npm cache EPERM
  • make npm-package-test still exited 0

Cause: the Makefile recipe runs multiple commands in one shell block without set -e, so a failed middle command can be masked by the final successful rm -rf.

Same risk exists in the install smoke block under make test.

Impact: CI can pass while packaging/install smoke checks are broken.

Proposed solution

  • Add set -e; at the start of the multi-command recipe blocks.
  • Use a temp npm cache for npm pack --dry-run, matching npm install behavior.
  • Ensure temp dirs are still cleaned up on success.

Alternatives considered

  • Split each smoke command into separate Makefile recipe lines.
  • Wrap smoke logic in a dedicated shell test script with set -euo pipefail.
  • Use trap cleanup for stronger temp-dir cleanup if moving logic into a script.

Scope

  • This does not require reading, copying, printing, uploading, or rewriting Codex auth tokens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions