{"id":17472747,"url":"https://github.com/shinnn/real-executable-path-callback","last_synced_at":"2025-07-04T08:04:14.280Z","repository":{"id":57348820,"uuid":"45342979","full_name":"shinnn/real-executable-path-callback","owner":"shinnn","description":"Callback style version of real-executable-path","archived":false,"fork":false,"pushed_at":"2019-01-08T08:07:10.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T02:49:43.545Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.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":"2015-11-01T14:12:47.000Z","updated_at":"2019-01-08T08:07:12.000Z","dependencies_parsed_at":"2022-09-19T12:11:12.929Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/real-executable-path-callback","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/shinnn/real-executable-path-callback","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Freal-executable-path-callback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Freal-executable-path-callback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Freal-executable-path-callback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Freal-executable-path-callback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/real-executable-path-callback/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Freal-executable-path-callback/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263297381,"owners_count":23444606,"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-10-18T17:35:27.535Z","updated_at":"2025-07-04T08:04:14.247Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","readme":"# real-executable-path-callback\n\n[![npm version](https://img.shields.io/npm/v/real-executable-path-callback.svg)](https://www.npmjs.com/package/real-executable-path-callback)\n[![Build Status](https://travis-ci.com/shinnn/real-executable-path-callback.svg?branch=master)](https://travis-ci.com/shinnn/real-executable-path-callback)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/real-executable-path-callback.svg)](https://coveralls.io/github/shinnn/real-executable-path-callback)\n\n[Callback](https://thenodeway.io/posts/understanding-error-first-callbacks/)-style version of [real-executable-path]:\n\n\u003e Find the first instance of an executable in the PATH, with expanding all symbolic links\n\n```javascript\nconst realExecutablePathCallback = require('real-executable-path-callback');\nconst which = require('which');\n\nrealExecutablePathCallback('npm', (err, binPath) =\u003e {\n  binPath; //=\u003e '/usr/local/lib/node_modules/npm/bin/npm-cli.js'\n});\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).\n\n```\nnpm install real-executable-path-callback\n```\n\n## API\n\n```javascript\nconst realExecutablePathCallback = require('real-executable-path-callback');\n```\n\n### realExecutablePathCallback(*binName* [, *options*], *callback*)\n\n*binName*: `string` (an executable name in the PATH)  \n*options*: `Object` ([`node-which` options](https://github.com/npm/node-which#options) except for `all`)  \n*callback*: `Function` (called after the path is resolved)\n\nIt finds the first instance of the given executable in the [PATH](http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap08.html#tag_08_03) environment variable, expands all symbolic links and resolves the canonicalized absolute pathname.\n\n```javascript\nconst realExecutablePathCallback = require('real-executable-path-callback');\n\nrealExecutablePathCallback('this_cmd_is_not_installed', err =\u003e {\n  err.message; //=\u003e 'not found: this_cmd_is_not_installed'\n  err.code; //=\u003e 'ENOENT'\n});\n```\n\n## Related project\n\n* [real-executable-path] — `Promise` version\n\n## License\n\n[ISC License](./LICENSE) © 2017 - 2019 Shinnosuke Watanabe\n\n[real-executable-path]: https://github.com/shinnn/real-executable-path\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Freal-executable-path-callback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Freal-executable-path-callback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Freal-executable-path-callback/lists"}