Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
taylordowns2000 opened this issue May 28, 2022 · 0 comments

Comments

@taylordowns2000
Copy link
Member

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)
    )
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

No branches or pull requests

1 participant