Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I fixed some calls to "sys" for you! #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

var sys = require("sys");
var util = require('util');
var no_de = require("./no.de");

var argv = process.argv.slice(2);
Expand Down Expand Up @@ -45,7 +45,7 @@ switch(command) {
params.push(false);
}
} else {
sys.puts("Missing arguments to create.");
util.puts("Missing arguments to create.");
method = null;
}
break;
Expand All @@ -54,5 +54,5 @@ switch(command) {
if(method && no_de.commands.hasOwnProperty(method) && no_de.commands[method].call) {
no_de.commands[method].apply(no_de, params);
} else {
sys.puts("invalid or missing command: `no.de help` for a list of commands");
util.puts("invalid or missing command: `no.de help` for a list of commands");
}
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var fs = require("fs");
var sys = require("sys");
var util = require('util');

var configFile = process.env.HOME + "/.no.de-config";
var config = {};
Expand Down
16 changes: 8 additions & 8 deletions lib/git.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var posix = require('child_process');
var sys = require("sys");
var util = require('util');

exports.add_remote = function(remote, cb) {
posix.exec('git remote add no.de "' + remote + '"', function(error, stdout, stderr) {
if(error) {
sys.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
util.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
cb && cb(false);
} else {
cb && cb(true);
Expand All @@ -16,10 +16,10 @@ exports.get_domain = function(cb, ignore_error) {
posix.exec("git config joyent.no_de.domain", function(error, stdout, stderr) {
if(error) {
if(ignore_error) return cb(null);
sys.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
util.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
cb(null);
} else if(!stdout.length) {
sys.puts("We could not find the domain for your no.de instance. Have you called create or bind yet?");
util.puts("We could not find the domain for your no.de instance. Have you called create or bind yet?");
cb(null);
} else {
var hostname = stdout.replace(/\s+/, "");
Expand All @@ -31,7 +31,7 @@ exports.get_domain = function(cb, ignore_error) {
exports.set_domain = function(domain, cb) {
posix.exec('git config joyent.no_de.domain "' + domain + '"', function(error, stdout, stderr) {
if(error) {
sys.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
util.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
cb && cb(false);
} else {
cb && cb(true);
Expand All @@ -43,10 +43,10 @@ exports.get_instanceid = function(cb, ignore_error) {
posix.exec("git config joyent.no_de.instanceid", function(error, stdout, stderr) {
if(error) {
if(ignore_error) return cb(null);
sys.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
util.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
cb(null);
} else if(!stdout.length) {
sys.puts("We could not find the instanceid for your no.de instance. Have you called create or bind yet?");
util.puts("We could not find the instanceid for your no.de instance. Have you called create or bind yet?");
cb(null);
} else {
var hostname = stdout.replace(/\s+/, "");
Expand All @@ -58,7 +58,7 @@ exports.get_instanceid = function(cb, ignore_error) {
exports.set_instanceid = function(instanceid, cb) {
posix.exec('git config joyent.no_de.instanceid "' + instanceid + '"', function(error, stdout, stderr) {
if(error) {
sys.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
util.puts("Git returned: \n\t" + stderr.replace(/\n/, "\n\t"));
cb && cb(false);
} else {
cb && cb(true);
Expand Down