GitShow/sindresorhus/shell-path
sindresorhus

shell-path

Get the $PATH from the shell

by sindresorhus
Star on GitHubForknpm

JavaScript

81 stars13 forks4 contributorsQuiet · 10mo agoSince 2015MIT

Meet the team

See all 4 on GitHub →
sindresorhus
sindresorhus29 contributions
silverwind
silverwind26 contributions
LitoMore
LitoMore1 contribution
Richienb
Richienb1 contribution

Languages

View on GitHub →
JavaScript100%

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
LitoMore
Add `shell` parameter & add type definitionsMergedPR

All to pass in the parameter to specify the shell.

LitoMore · 10mo ago
kabkee
SyntaxError: Cannot use import statement outside a moduleClosedIssue

The inside of shell-path, it seems like using shell-env. It seems like shell-env causes the blow problem. please take a look the below. Thanks. On Terminal with executing "yarn electron:serve" :: require() of ES modules is not supported. require() of .../path-to/node_modules/shell-path/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from ../path-to/node_modules/shell-path/package.json. x On Browser Developer Console :: Uncaught ../path-to/node_modules/shell-path/index.js:1 (function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { import {shellEnv, shellEnvSync} from 'shell-env'; ^^^^^^ SyntaxError: Cannot use import statement outside a module at new Script (vm.js:84:7) at createScript (vm.js:258:10) at Object.runInThisContext (vm.js:306:10) at Module._compile (internal/modules/cjs/loader.js:883:26) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10) at Module.load (internal/modules/cjs/loader.js:815:32) at Module._load (internal/modules/cjs/loader.js:727:14) at Function.Module._load (electron/js2c/asar.js:769:28) at Module.require (internal/modules/cjs/loader.js:852:19) at require (internal/modules/cjs/helpers.js:74:18)

kabkee · 4y ago
blahah
Use latest shell-env (fixing upstream broken dep)MergedPR

This makes https://github.com/sindresorhus/shell-env/issues/12 available downstream and fixes e.g. https://github.com/sindresorhus/fix-path/issues/14 (although fix-path will need a bump once this is released).

blahah · 4y ago
Structured data for AI agents

Repository: sindresorhus/shell-path. Description: Get the $PATH from the shell Stars: 81, Forks: 13. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Open PRs: 0, open issues: 0. Last activity: 10mo ago. Community health: 71%. Top contributors: sindresorhus, silverwind, LitoMore, Richienb.

·@ofershap

Replace github.com with gitshow.dev