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

fix: allow remote-less origins #81

Conversation

colinnielsen
Copy link
Contributor

Background

Checklist

  • Documentation updated
  • Tested code changes

ticket

@linear
Copy link

linear bot commented Sep 14, 2023

MP-385 Allow remote-less git repos

Error: Command failed: git config --get remote.origin.url
    at checkExecSyncError (node:child_process:885:11)
    at execSync (node:child_process:957:15)
    at getGitRemote (/Users/chun/.config/yarn/global/node_modules/0xmetropolis/cli/dist/utils/git.js:38:54)
    at getRepoMetadata (/Users/chun/.config/yarn/global/node_modules/0xmetropolis/cli/dist/utils/git.js:94:48)
    at /Users/chun/.config/yarn/global/node_modules/0xmetropolis/cli/dist/commands/preview.js:141:52
    at Generator.next (<anonymous>)
    at fulfilled (/Users/chun/.config/yarn/global/node_modules/0xmetropolis/cli/dist/commands/preview.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  status: 1,
  signal: null,
  output: [ null, <Buffer >, <Buffer > ],
  pid: 22892,
  stdout: <Buffer >,
  stderr: <Buffer >
}
  • When running metro preview ... in a Foundry project folder that has no remote url set, the command will fail (error message above)
  • Needs to be handled more gracefully by either catching earlier or allow to skip remote repo checking

@colinnielsen colinnielsen changed the title fix: remote url bug fix: allow remote-less origins Sep 15, 2023
@colinnielsen colinnielsen merged commit 98d7502 into main Sep 18, 2023
@colinnielsen colinnielsen deleted the colinnielsen/mp-385-preview-command-fails-when-remoteoriginurl-is-not-yet branch September 18, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants