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

passing env object causes issues #269

Open
alex-Symbroson opened this issue Mar 15, 2024 · 2 comments
Open

passing env object causes issues #269

alex-Symbroson opened this issue Mar 15, 2024 · 2 comments

Comments

@alex-Symbroson
Copy link
Contributor

I'm using docker-desktop on windows and having issues when trying to pass an env object to any compose command.
Happens even if env is just an empty object

Its not a major issue because in my case I can fall back to regular docker commandOptions instead of defining env, but still wanted to let you know.

demo logs:

$ docker [ 'compose', 'up', '-d', 'myservice' ] {
  cwd: 'C:\\path\\to\\compose\\config',
  env: {}
}
E:  myservice:  unknown shorthand flag: 'd' in -d

works with env: undefined:

$ docker [ 'compose', 'up', '-d', 'myservice' ] {
  cwd: 'C:\\path\\to\\compose\\config',
  env: undefined
}
E:  myservice:  Network mynetwork  Creating
E:  myservice:
E:  myservice:  Network mynetwork  Created
E:  myservice:
E:  myservice:  Network mynetwork  Starting
E:  myservice:
E:  myservice:  Network mynetwork  Started
@AlexZeitler
Copy link
Contributor

@alex-Symbroson Thanks for reporting!

@Joe-Kollin
Copy link

Joe-Kollin commented Apr 23, 2024

Getting the same on a LINUX SUSE OS:

export async function up(directory: string): Promise<void> {
  await compose.upAll({ cwd: directory, log: true });
}
exitCode: 125,
 err: "unknown shorthand flag: 'd' in -d\n" +
  "See 'docker --help'.\n" +
  '\n' +
  'Usage:  docker [OPTIONS] COMMAND\n' +
  '\n' +
  'A self-sufficient runtime for containers\n' +
  '\n' +
...

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