Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
Fix error message (--remote, not --origin).
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 23, 2014
1 parent bcfdb1e commit 4a9ac2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/gistup
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}
Expand Down

0 comments on commit 4a9ac2d

Please sign in to comment.