{"id":23138372,"url":"https://github.com/deployable/node-deployable-run","last_synced_at":"2026-05-06T00:36:27.007Z","repository":{"id":57107570,"uuid":"87698554","full_name":"deployable/node-deployable-run","owner":"deployable","description":"Run things, save their output, check their exit code. ","archived":false,"fork":false,"pushed_at":"2017-04-09T11:50:13.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T06:38:19.309Z","etag":null,"topics":["command","nodejs","npm-module","shell","spawn"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deployable.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-09T09:51:55.000Z","updated_at":"2017-04-09T09:52:48.000Z","dependencies_parsed_at":"2022-08-20T17:11:02.697Z","dependency_job_id":null,"html_url":"https://github.com/deployable/node-deployable-run","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deployable/node-deployable-run","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-deployable-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-deployable-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-deployable-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-deployable-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deployable","download_url":"https://codeload.github.com/deployable/node-deployable-run/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deployable%2Fnode-deployable-run/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265710961,"owners_count":23815441,"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":["command","nodejs","npm-module","shell","spawn"],"created_at":"2024-12-17T13:10:45.534Z","updated_at":"2025-10-23T16:12:52.409Z","avatar_url":"https://github.com/deployable.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Run a process, store it's output, log things\n\n```javascript\nconst {Run, RunRcError, RunError} = require('../run')\n\nfunction genRunCmd(...cmd){\n  return function(){\n    return Run.fullLog(...cmd)\n      .catch(RunRcError, err =\u003e console.error(' Got a bad rc \"%s\"', err.results.command, err.results.exit_code))\n      .catch(RunError, err =\u003e console.error(' Got a RunError: ', err))\n      .catch(err =\u003e console.error(' Got an Error: ', err ))\n  }\n}\n\ngenRunCmd('ls')()\n  .then(genRunCmd('ls','whatever'))\n  .then(genRunCmd('lsa','broke'))\n  .then(genRunCmd('ls','sp ace', { ignore_rc: true }))\n```\n\nOutput\n\n```\n$ node test/run.js\nRun[92063] Running: [\"ls\"]\nRun[92063] stdout: error-goog.png\nRun[92063] stdout: search-bing.png\nRun[92063] stdout: search.js\nRun[92063] Finished: [\"ls\"]\nRun[92064] Running: [\"ls\",\"whatever\"]\nRun[92064] stderr: ls: whatever: No such file or directory\nRun[92064] Failed: [\"ls\",\"whatever\"]\n Got a bad rc \"ls,whatever\" 1\nRun[] Running: [\"lsa\",\"broke\"]\nRun[] Run failed to start command [\"lsa\",\"broke\"]: Command not found [lsa]\n Got a RunError:  Command not found [lsa]\nRun[92066] Running: [\"ls\",\"sp ace\"]\nRun[] Failed: [\"lsa\",\"broke\"]\nRun[92066] stderr: ls: sp ace: No such file or directory\nRun[92066] Failed: [\"ls\",\"sp ace\"]\n Got a bad rc \"ls,sp ace\" 1\n\n```\n\n`Run` comes with some preset class setups\n\n### `Run.startLog(command)`\n\nLog the start of command and any errors\n\n### `Run.fullLog(command)`\n\nLog the start of a command, stdout and stderr while running, and end\n\n### `Run.postLog(command)`\n\nLog the start and end. Log stdout and stderr after completion.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeployable%2Fnode-deployable-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeployable%2Fnode-deployable-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeployable%2Fnode-deployable-run/lists"}