Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Quick hack to not use complete on travis

  • Loading branch information...
commit b0dd2ecefce3aabd5f4c28ee6af6a0d775cc4356 1 parent e63ba60
@davglass davglass authored
Showing with 33 additions and 28 deletions.
  1. +33 −28 bin/yogi.js
View
61 bin/yogi.js
@@ -7,38 +7,43 @@ http://yuilibrary.com/license/
*/
var args = require('../lib/args');
-var complete = require('complete');
-
-var comp = {
- program: 'yogi',
- commands: {},
- options: {
- '--help': {},
- '-h': {},
- '--version': {},
- '-v': {}
- }
-};
-Object.keys(args.cmds).forEach(function(item) {
- comp.commands[item] = {};
- if (args.cmds[item].shell_complete) {
- args.cmds[item].shell_complete.forEach(function(line) {
- comp.commands[item][line] = {};
- });
- } else if (args.cmds[item].help) {
- var help = args.cmds[item].help();
- help.forEach(function(line) {
- if (line.indexOf('--') === 0) {
- line = line.split(' ')[0];
+if (!('TRAVIS' in process.env)) {
+
+ var complete = require('complete');
+
+ var comp = {
+ program: 'yogi',
+ commands: {},
+ options: {
+ '--help': {},
+ '-h': {},
+ '--version': {},
+ '-v': {}
+ }
+ };
+
+ Object.keys(args.cmds).forEach(function(item) {
+ comp.commands[item] = {};
+ if (args.cmds[item].shell_complete) {
+ args.cmds[item].shell_complete.forEach(function(line) {
comp.commands[item][line] = {};
- }
- });
- }
-});
+ });
+ } else if (args.cmds[item].help) {
+ var help = args.cmds[item].help();
+ help.forEach(function(line) {
+ if (line.indexOf('--') === 0) {
+ line = line.split(' ')[0];
+ comp.commands[item][line] = {};
+ }
+ });
+ }
+ });
-complete(comp);
+ complete(comp);
+
+}
var log = require('../lib/log');
var config = require('../lib/config');
Please sign in to comment.
Something went wrong with that request. Please try again.