+13
-22
| #!/usr/bin/env node | ||
| 'use strict'; | ||
| var pkg = require('./package.json'); | ||
| var meow = require('meow'); | ||
| var fullname = require('./'); | ||
| var argv = process.argv.slice(2); | ||
| function help() { | ||
| console.log([ | ||
| '', | ||
| ' ' + pkg.description, | ||
| '', | ||
| ' Example', | ||
| ' fullname', | ||
| ' Sindre Sorhus' | ||
| ].join('\n')); | ||
| } | ||
| meow({ | ||
| help: [ | ||
| 'Example', | ||
| ' $ fullname', | ||
| ' Sindre Sorhus' | ||
| ] | ||
| }); | ||
| if (argv.indexOf('--help') !== -1) { | ||
| help(); | ||
| return; | ||
| } | ||
| fullname(function (err, name) { | ||
| if (err) { | ||
| console.error(err.message); | ||
| process.exit(1); | ||
| } | ||
| if (argv.indexOf('--version') !== -1) { | ||
| console.log(pkg.version); | ||
| return; | ||
| } | ||
| fullname(function (err, name) { | ||
| console.log(name); | ||
| }); |
+1
-1
@@ -84,3 +84,3 @@ 'use strict'; | ||
| exec('getent passwd $(whoami)', function (err, stdout) { | ||
| fullname = stdout.trim().split(':')[4].replace(/,.*/, ''); | ||
| fullname = (stdout.trim().split(':')[4] || '').replace(/,.*/, ''); | ||
@@ -87,0 +87,0 @@ if (err || !fullname) { |
+5
-5
| { | ||
| "name": "fullname", | ||
| "version": "1.1.0", | ||
| "version": "1.1.1", | ||
| "description": "Get the fullname of the current user", | ||
@@ -10,7 +10,5 @@ "license": "MIT", | ||
| "email": "sindresorhus@gmail.com", | ||
| "url": "http://sindresorhus.com" | ||
| "url": "sindresorhus.com" | ||
| }, | ||
| "bin": { | ||
| "fullname": "cli.js" | ||
| }, | ||
| "bin": "cli.js", | ||
| "engines": { | ||
@@ -27,2 +25,3 @@ "node": ">=0.10.0" | ||
| "keywords": [ | ||
| "cli-app", | ||
| "cli", | ||
@@ -46,2 +45,3 @@ "bin", | ||
| "dependencies": { | ||
| "meow": "^3.3.0", | ||
| "npmconf": "^2.1.1" | ||
@@ -48,0 +48,0 @@ }, |
+1
-1
@@ -39,3 +39,3 @@ # fullname [](https://travis-ci.org/sindresorhus/fullname) | ||
| Example | ||
| fullname | ||
| $ fullname | ||
| Sindre Sorhus | ||
@@ -42,0 +42,0 @@ ``` |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
4891
-3.3%2
100%97
-7.62%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added