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

Raise an error if npm install fails during "install runtime" mix task #38

@taylordowns2000

Description

@taylordowns2000

The System.cmd() in lib/mix/engine.install.runtime.ex should be wrapped in a case statement that checks for the exit of the npm install command then raises an error if it fails. Oterhwise, folks could run mix openfn.install.runtime and get a false success due to npm errors.

    System.cmd(
      "/usr/bin/env",
      [
        "sh",
        "-c",
        "npm install --prefix $NODE_PATH --global #{package_list}"
      ],
      env: [{"NODE_PATH", @default_path}],
      stderr_to_stdout: true,
      into: IO.stream(:stdio, :line)
    )

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