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

indo fails when trying to add a local repo to "repos" without an origin #24

Open
aleclarson opened this issue Aug 10, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@aleclarson
Copy link
Collaborator

Steps to reproduce

  1. Create a sub-directory in a project that uses indo
  2. Run git init in that sub-directory
  3. Run indo and select "Add to repos"
  4. 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
}
@aleclarson aleclarson added the bug Something isn't working label Aug 10, 2020
@aleclarson
Copy link
Collaborator Author

To fix this, we should prompt the user for an origin (and offer to create a new repo if hub command exists).

@aleclarson
Copy link
Collaborator Author

It also fails if no initial commit exists yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant