From 4a9ac2d7afa4a776e2477c11fb5a3e12052965bd Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Sun, 23 Mar 2014 13:02:08 -0700 Subject: [PATCH] Fix error message (--remote, not --origin). --- bin/gistup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/gistup b/bin/gistup index 2b51b04..105f6e5 100755 --- a/bin/gistup +++ b/bin/gistup @@ -166,7 +166,7 @@ function gitInit(callback) { function gitRemoteDoesNotExist(callback) { child.exec("git config --get remote." + singlequote(argv.remote) + ".url || true", function(error, stdout, stderr) { if (!error && stderr) process.stderr.write(stderr), error = new Error("git config failed."); - if (!error && stdout) error = new UserError("the remote \"" + argv.remote + "\" already exists." + os.EOL + os.EOL + "Are you trying to run gistup in a directory that already has a git" + os.EOL + "repository? This would overwrite your existing remote, which points to:" + os.EOL + os.EOL + " " + stdout + os.EOL + "If you’ve previously run gistup in this directory and you want to update" + os.EOL + "your gist, just push to the existing git remote:" + os.EOL + os.EOL + " git push" + os.EOL + os.EOL + "Or, if you don’t need this remote anymore, remove it and gistup will" + os.EOL + "replace it with a new one the next time you run it:" + os.EOL + os.EOL + " git remote rm " + argv.remote + os.EOL + os.EOL + "Lastly, you can also specify a different remote name for gistup, so that" + os.EOL + "you can push to multiple git remotes:" + os.EOL + os.EOL + " gistup --origin=gist" + os.EOL + os.EOL + "Please fix and try again."); + if (!error && stdout) error = new UserError("the remote \"" + argv.remote + "\" already exists." + os.EOL + os.EOL + "Are you trying to run gistup in a directory that already has a git" + os.EOL + "repository? This would overwrite your existing remote, which points to:" + os.EOL + os.EOL + " " + stdout + os.EOL + "If you’ve previously run gistup in this directory and you want to update" + os.EOL + "your gist, just push to the existing git remote:" + os.EOL + os.EOL + " git push" + os.EOL + os.EOL + "Or, if you don’t need this remote anymore, remove it and gistup will" + os.EOL + "replace it with a new one the next time you run it:" + os.EOL + os.EOL + " git remote rm " + argv.remote + os.EOL + os.EOL + "Lastly, you can also specify a different remote name for gistup, so that" + os.EOL + "you can push to multiple git remotes:" + os.EOL + os.EOL + " gistup --remote=gist" + os.EOL + os.EOL + "Please fix and try again."); callback(error); }); }