mbed-cli: mbed import and mbed add broken on cygwin

In my experience so far, most mbed-cli commands work as well in Cygwin as they do from the Windows command line. The import and add commands don’t work, though, as shown below. (I tried a few different ways, to see if there was a workaround.)

Looks like it’s just an issue with the way the output directory path is generated.

Issue #299 also relates to paths on cygwin, so be careful not to introduce a regression there when fixing this.

Originally posted on mbed forum: mbed-cli on cygwin.

me@pc /cygdrive/c/dev
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky
fatal: Invalid path '/cygdrive/c/dev/C:\dev\mbed-os-example-blinky': No such file or directory
abort: HTTP Error 406: Not Acceptable
[mbed] Importing program "mbed-os-example-blinky" from "https://github.com/ARMmbed/mbed-os-example-blinky" at latest revision in the current branch
[mbed] ERROR: Unable to clone repository (https://github.com/ARMmbed/mbed-os-example-blinky)
---
 
me@pc /cygdrive/c/dev
$ mbed import mbed-os-example-blinky ./mbed-os-example-blinky
fatal: Invalid path '/cygdrive/c/dev/C:\dev\mbed-os-example-blinky': No such file or directory
abort: HTTP Error 406: Not Acceptable
[mbed] Importing program "mbed-os-example-blinky" from "https://github.com/ARMmbed/mbed-os-example-blinky" at latest revision in the current branch
[mbed] ERROR: Unable to clone repository (https://github.com/ARMmbed/mbed-os-example-blinky)
---
 
me@pc /cygdrive/c/dev
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky ./test1
fatal: Invalid path '/cygdrive/c/dev/C:\dev\test1': No such file or directory
abort: HTTP Error 406: Not Acceptable
[mbed] Importing program "test1" from "https://github.com/ARMmbed/mbed-os-example-blinky" at latest revision in the current branch
[mbed] ERROR: Unable to clone repository (https://github.com/ARMmbed/mbed-os-example-blinky)
---

[do import from Windows cmd prompt...]

me@pc /cygdrive/c/dev
$ cd mbed-os-example-blinky/

me@pc /cygdrive/c/dev/mbed-os-example-blinky
$ mbed add sd-driver
fatal: Invalid path '/cygdrive/c/dev/mbed-os-example-blinky/C:\dev\mbed-os-example-blinky\sd-driver': No such file or directory
abort: HTTP Error 406: Not Acceptable
[mbed] Adding library "sd-driver" from "https://github.com/ARMmbed/sd-driver" at latest revision in the current branch
[mbed] ERROR: Unable to clone repository (https://github.com/ARMmbed/sd-driver/)
---

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 39 (37 by maintainers)

Most upvoted comments

Hi all, I’m sorry but cygwin is not a supported platform for the mbed CLI tools; although it seems that some users have managed to achieve some level of success here. We’d welcome PRs from the community that help support this platform in future.