Skip to content

Commit

Permalink
Require Node.js 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 29, 2019
1 parent e208dd0 commit df80620
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -7,6 +7,6 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package.json,*.yml}]
[*.yml]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion .gitattributes
@@ -1 +1 @@
* text=auto
* text=auto eol=lf
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
node_modules
yarn.lock
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
package-lock=false
5 changes: 3 additions & 2 deletions .travis.yml
@@ -1,5 +1,6 @@
os: osx
language: node_js
node_js:
- '6'
- '4'
- '12'
- '10'
- '8'
20 changes: 4 additions & 16 deletions license
@@ -1,21 +1,9 @@
The MIT License (MIT)
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
83 changes: 39 additions & 44 deletions package.json
@@ -1,46 +1,41 @@
{
"name": "fix-path",
"version": "2.1.0",
"description": "Fix the $PATH on macOS when run from a GUI app",
"license": "MIT",
"repository": "sindresorhus/fix-path",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"fix",
"path",
"macos",
"osx",
"env",
"var",
"environment",
"variable",
"shell",
"sh",
"zsh",
"electron",
"nwjs"
],
"dependencies": {
"shell-path": "^2.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
},
"xo": {
"esnext": true
}
"name": "fix-path",
"version": "2.1.0",
"description": "Fix the $PATH on macOS when run from a GUI app",
"license": "MIT",
"repository": "sindresorhus/fix-path",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"fix",
"path",
"macos",
"osx",
"env",
"environment",
"variable",
"shell",
"sh",
"zsh",
"electron"
],
"dependencies": {
"shell-path": "^2.0.0"
},
"devDependencies": {
"ava": "^1.4.1",
"xo": "^0.24.0"
}
}
9 changes: 2 additions & 7 deletions readme.md
Expand Up @@ -2,13 +2,13 @@

> Fix the `$PATH` on macOS when run from a GUI app
Useful for Electron/NW.js apps as GUI apps on macOS doesn't inherit the `$PATH` defined in your dotfiles *(.bashrc/.bash_profile/.zshrc/etc)*.
Useful for Electron apps as GUI apps on macOS doesn't inherit the `$PATH` defined in your dotfiles *(.bashrc/.bash_profile/.zshrc/etc)*.


## Install

```
$ npm install --save fix-path
$ npm install fix-path
```


Expand All @@ -30,8 +30,3 @@ console.log(process.env.PATH);
## Related

- [shell-path](https://github.com/sindresorhus/shell-path) - Get the `$PATH` from the shell


## License

MIT © [Sindre Sorhus](https://sindresorhus.com)
8 changes: 4 additions & 4 deletions test.js
@@ -1,7 +1,7 @@
import test from 'ava';
import m from './';
import fixPath from '.';

test(t => {
m();
t.true(process.env.PATH.indexOf('/usr/local') !== -1);
test('main', t => {
fixPath();
t.true(process.env.PATH.includes('/usr/local'));
});

0 comments on commit df80620

Please sign in to comment.