{"id":13526778,"url":"https://github.com/zentrick/cross-spawn-promise","last_synced_at":"2025-07-18T08:33:16.980Z","repository":{"id":57210766,"uuid":"52973730","full_name":"zentrick/cross-spawn-promise","owner":"zentrick","description":"Promisified cross-spawn.","archived":false,"fork":false,"pushed_at":"2020-05-25T15:37:24.000Z","size":814,"stargazers_count":25,"open_issues_count":19,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-14T09:11:45.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zentrick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-02T15:28:32.000Z","updated_at":"2022-02-09T08:22:01.000Z","dependencies_parsed_at":"2022-08-30T14:11:10.091Z","dependency_job_id":null,"html_url":"https://github.com/zentrick/cross-spawn-promise","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/zentrick/cross-spawn-promise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrick%2Fcross-spawn-promise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrick%2Fcross-spawn-promise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrick%2Fcross-spawn-promise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrick%2Fcross-spawn-promise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zentrick","download_url":"https://codeload.github.com/zentrick/cross-spawn-promise/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zentrick%2Fcross-spawn-promise/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265728814,"owners_count":23818729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:34.613Z","updated_at":"2025-07-18T08:33:16.910Z","avatar_url":"https://github.com/zentrick.png","language":"JavaScript","funding_links":[],"categories":["Repository"],"sub_categories":["Shell"],"readme":"# cross-spawn-promise\n\n[![npm](https://img.shields.io/npm/v/cross-spawn-promise.svg)](https://www.npmjs.com/package/cross-spawn-promise) [![Dependencies](https://img.shields.io/david/zentrick/cross-spawn-promise.svg)](https://david-dm.org/zentrick/cross-spawn-promise) [![Linux Build Status](https://img.shields.io/circleci/project/github/zentrick/cross-spawn-promise/master.svg?label=linux+build)](https://circleci.com/gh/zentrick/cross-spawn-promise) [![Windows Build Status](https://img.shields.io/appveyor/ci/zentrick/cross-spawn-promise/master.svg?label=windows+build)](https://ci.appveyor.com/project/zentrick/cross-spawn-promise) [![Coverage Status](https://img.shields.io/coveralls/zentrick/cross-spawn-promise/master.svg)](https://coveralls.io/r/zentrick/cross-spawn-promise) [![JavaScript Standard Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n\nPromisified [cross-spawn](https://www.npmjs.com/package/cross-spawn).\n\n## Usage\n\n```js\nimport spawn from 'cross-spawn-promise'\n\nconst command = 'ls'\nconst args = ['-al', '/etc']\nconst options = {}\nspawn(command, args, options)\n  .then((stdout) =\u003e {\n    console.info('Success!')\n    console.info('stdout:', stdout.toString())\n  })\n  .catch((error) =\u003e {\n    console.error('Failed!')\n    console.error('exit status:', error.exitStatus)\n    console.error('stderr:', error.stderr.toString())\n  })\n```\n\n## API\n\n```js\nasync spawn(command[, args][, options])\n```\n\nThe returned `Promise` will resolve to the process's standard output. Depending\non the value of the `encoding` option (see below), it will either be a\n[`Buffer`](https://nodejs.org/api/buffer.html) or a string.\n\nThe promise also exposes the created child process via its `childProcess`\nproperty.\n\nUpon rejection, the following properties provide additional information on the\n`Error` object:\n\n- `exitSignal`\n- `exitStatus`\n- `stdout`\n- `stderr`\n\n## Options\n\nAll options are passed on to\n[cross-spawn](https://www.npmjs.com/package/cross-spawn), with the exception of\nthe additional `encoding` option. If you pass a string (e.g., `'utf8'`), it will\nbe used as the\n[default character encoding](https://nodejs.org/api/stream.html#stream_readable_setencoding_encoding).\n\n## Maintainer\n\n[Tim De Pauw](https://github.com/timdp)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentrick%2Fcross-spawn-promise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzentrick%2Fcross-spawn-promise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzentrick%2Fcross-spawn-promise/lists"}