ARMmbed / mbed-tools

⚠️ Beta Status: New command line tooling for Mbed OS
Apache License 2.0
45 stars 30 forks source link

Deploy command fails on non-git repos. #331

Open BioBox opened 2 years ago

BioBox commented 2 years ago

Describe the bug Unfortunately, it seems like the mbed website allows non-git repos and the deploy command assumes that they are all git.

To Reproduce Steps to reproduce the behavior:

  1. Create a new project.
  2. Add https://os.mbed.com/users/romilly/code/MCP23S17/#068b1e8909bb to a .lib file.
  3. Run mbedtools deploy

Expected behavior The repository is cloned into the current directory.

Current behavior The command fails because this is a mericurial repository, not a git one.

Cloning into '#068b1e8909bb'...
fatal: https://os.mbed.com/users/romilly/code/MCP23S17/#068b1e8909bb/info/refs not valid: could not determine hash algorithm; is this a git repository?

Solving the Problem

We need a way to tell what version control system a project is using and select the appropriate tool. Or just wipe all these projects off the site, that works too :smiling_imp: