Skip to content

simulator start fails on windows if username has space in it #398

@dogoth

Description

@dogoth

VSCode Version: 1.71.1
OS Version: Win 11 Pro
Extension Version: 1.25.9

Steps to Reproduce:

  1. when installing windows, choose pick a username that has a space in it. eg "John Smith"
  2. install Visual Studio Code, Azure IoT Tools
  3. start a nodejs iot edge solution (not sure if language choice here is significant)
  4. create module, use "Build and Run IoT Edge Solution in Simulator" feature

error message:
"
ERROR: Error while executing command: docker-compose -f C:\Users\John Smith\AppData\Local.iotedgehubdev\data\data\docker-compose.yml down. Command '['docker-compose', '-f', 'C:\Users\John', 'Smith\AppData\Local.iotedgehubdev\data\data\docker-compose.yml', 'down']' returned non-zero exit status 1.
"

further down an extra clue
"
"No such command: Smith\AppData\Local.iotedgehubdev\data\data\docker_compose.yml"
"

this suggests that the issue is the space during filename declaration to the command for docker-compose, the space maknig it treat the second half as a argument

looks to be issue here:

cmd = "docker-compose -f {0} down".format(EdgeManager.COMPOSE_FILE)

the argument to -f needs to be in quotes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions