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

Compose Up command escaping issue on folder with spaces #4291

Open
junieresmat opened this issue Apr 28, 2024 · 1 comment
Open

Compose Up command escaping issue on folder with spaces #4291

junieresmat opened this issue Apr 28, 2024 · 1 comment

Comments

@junieresmat
Copy link

When using the Compose Up context menu option on a folder that has spaces in the name
image

I get the following on the terminal windows

 Executing task: docker compose -f "My Folder\test-docker-compose.yaml" up -d --build 


Usage:  docker compose [OPTIONS] COMMAND

Define and run multi-container applications with Docker

Options:
      --ansi string                Control when to print ANSI control
                                   characters ("never"|"always"|"auto")
                                   (default "auto")
      --compatibility              Run compose in backward compatibility mode
      --dry-run                    Execute command in dry run mode
      --env-file stringArray       Specify an alternate environment file
  -f, --file stringArray           Compose configuration files
      --parallel int               Control max parallelism, -1 for
                                   unlimited (default -1)
      --profile stringArray        Specify a profile to enable
      --progress string            Set type of progress output (auto,
                                   tty, plain, quiet) (default "auto")
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the, first
                                   specified, Compose file)
  -p, --project-name string        Project name

Commands:
  attach      Attach local standard input, output, and error streams to a service's running container
  build       Build or rebuild services
  config      Parse, resolve and render compose file in canonical format
  cp          Copy files/folders between a service container and the local filesystem
  create      Creates containers for a service
  down        Stop and remove containers, networks
  events      Receive real time events from containers
  exec        Execute a command in a running container
  images      List images used by the created containers
  kill        Force stop service containers
  logs        View output from containers
  ls          List running compose projects
  pause       Pause services
  port        Print the public port for a port binding
  ps          List containers
  pull        Pull service images
  push        Push service images
  restart     Restart service containers
  rm          Removes stopped service containers
  run         Run a one-off command on a service
  scale       Scale services
  start       Start services
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop services
  top         Display the running processes
  unpause     Unpause services
  up          Create and start containers
  version     Show the Docker Compose version information
  wait        Block until the first service container stops
  watch       Watch build context for service and rebuild/refresh containers when files are updated

Run 'docker compose COMMAND --help' for more information on a command.
unknown docker command: "compose Folder\\test-docker-compose.yaml"

 *  The terminal process "C:\Users\{MyUser}\AppData\Local\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe\pwsh.exe -Command docker compose -f "My Folder\test-docker-compose.yaml" up -d --build" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

It seems like the escaping is the command is causing this.
image

After I rename the folder to remove the space "My Folder" => "My_Folder" the command works fine.
image

@junieresmat junieresmat changed the title Compose Up command scaping issue on folder with spaces Compose Up command escaping issue on folder with spaces Apr 28, 2024
@dbreshears dbreshears added this to the 1.30.0 milestone May 8, 2024
@bwateratmsft
Copy link
Collaborator

bwateratmsft commented Dec 12, 2024

I am able to reproduce the issue on Windows with pwsh. Still need to check if this affects Mac and Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants