Skip to content

Commit

Permalink
if args is null, then show the help
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuehh committed Mar 18, 2013
1 parent 794018e commit 97b14c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/gtrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ var request = require('request');
function trs(word) {
"use strict";

if(!word) {
console.log("Usage: gtrs word");
return;
}

var firstChar = word[0].charCodeAt(0);
var sl, tl;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gtrs",
"version": "0.0.1",
"version": "0.0.2",
"homepage": "https://github.com/lyuehh/google-translate-ci",
"description": "Google Translate command line tool",
"author": {
Expand Down

0 comments on commit 97b14c5

Please sign in to comment.