Skip to content

os/exec: Command doesn't seem to work as I expected #14632

@rdeusser

Description

@rdeusser

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?

    1.6

  2. What operating system and processor architecture are you using (go env)?

    GOARCH="amd64"
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOOS="darwin"

  3. What did you do?
    (Use play.golang.org to provide a runnable example, if possible.)

    Basically, I'm just calling ovftool with some arguments using exec.Command, but it's erroring out due to the way quotes are being passed in. Here's an example: https://play.golang.org/p/thL1dc3yxd

  4. What did you expect to see?

    This is what I get when ovftool is called via exec.Command:

    Opening OVF source: "vsphere-ubuntu-14.04.4.vmx"
    Error: Failed to open OVF descriptor
    Completed with errors

    But when the command is copy-pasted into the terminal, it works.

  5. What did you see instead?

    I expected it to work exactly like it would If I typed it in a terminal. I don't quite understand what is or isn't happening so I don't know if this is a Go problem or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions