Visitar URL original
apple m1 throw error · Issue #152 · moxystudio/node-cross-spawn · GitHub
Skip to content

apple m1 throw error #152

Closed
Closed

Description

@scZhengChao

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.spawnSafeSync = void 0;
const cross_spawn_1 = require("cross-spawn");
const defaultOptions = {
logStdErrOnError: true,
throwOnError: true,
};
const spawnSafeSync = (command, args, options) => {
const mergedOptions = Object.assign({}, defaultOptions, options);
const result = cross_spawn_1.sync(command, args, options);
if (result.error || result.status !== 0) {
if (mergedOptions.logStdErrOnError) {
if (result.stderr) {
console.error(result.stderr.toString());
}
else if (result.error) {
console.error(result.error);
}
}
if (mergedOptions.throwOnError) {
throw result;
}
}
return result;
};
exports.spawnSafeSync = spawnSafeSync;

Activity

  1. chrystianrgs commented on Nov 30, 2024

    @chrystianrgs

    var http = require("http");

    http.createServer(function (request, response) {
    // Send the HTTP header
    // HTTP Status: 200 : OK
    // Content Type: text/plain
    response.writeHead(200, {'Content-Type': 'text/plain'});

    // Send the response body as "Hello World"
    response.end('Hello World\n');
    

    }).listen(8081);

    // Console will print the message
    console.log('Server running at http://127.0.0.1:8081/');
    console.error('This is on STDERR');

  2. satazor commented on Nov 1, 2026

    @satazor
    Contributor

    This is a strange report. Please give clear instructions on how to reproduce the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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