indo
indo copied to clipboard
`indo` fails when trying to add a local repo to "repos" without an origin
Steps to reproduce
- Create a sub-directory in a project that uses
indo - Run
git initin that sub-directory - Run
indoand select "Add to repos" - Witness a grotesque crash like this:
error: Error: fatal: No such remote 'origin'
at exec (~/indo/node_modules/.pnpm/registry.npmjs.org/@cush/exec/1.6.2/node_modules/@cush/exec/index.js:88:21)
at Function.execSync [as sync] (~/indo/node_modules/.pnpm/registry.npmjs.org/@cush/exec/1.6.2/node_modules/@cush/exec/index.js:11:10)
at Object.getRemoteUrl (~/indo/dist/core/git.js:15:31)
at findUnknownRepos (~/indo/dist/commands/default.js:75:36)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.exports.default (~/indo/dist/commands/default.js:24:5) {
exitCode: 128
}
To fix this, we should prompt the user for an origin (and offer to create a new repo if hub command exists).
It also fails if no initial commit exists yet