Skip to content

Commit 26d3ffd

Browse files
doug2k1piuccio
authored andcommitted
Fix #28 by stripping the trailing new line (#29)
1 parent e3ecdc5 commit 26d3ffd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if (argv.l) {
4646
} else {
4747
require("get-stdin")().then(function (data) {
4848
if (data) {
49-
argv._ = [data];
49+
argv._ = [require("strip-eof")(data)];
5050
say();
5151
} else {
5252
showHelp();

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"dependencies": {
4343
"get-stdin": "^5.0.1",
4444
"optimist": "~0.6.1",
45-
"string-width": "~2.1.1"
45+
"string-width": "~2.1.1",
46+
"strip-eof": "^1.0.0"
4647
},
4748
"devDependencies": {
4849
"nodeunit": "~0.11.1",

0 commit comments

Comments
 (0)