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

Unable to use the "--env-file" option on "finch compose up" command #890

Open
nodematerial opened this issue Apr 7, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@nodematerial
Copy link

Describe the bug
Cannot use --env-file option with finch compose up command

software version
finch: 1.1.3
MacOS: Sonoma 14.4.1

Steps to reproduce

  1. Put two files below in the same directory.
# compose.yml

services:
  show-env:
    command:
      - env
    image: busybox
# .env.test

A=1
B=2
  1. Execute the following command.
finch compose up --env-file .env.test show-env

Expected behavior
The busybox container executes env command, and the container stops.
The standard output may be like as follows

INFO[0000] Ensuring image busybox
INFO[0000] Creating container test-show-env-1
INFO[0000] Attaching to logs
show-env-1 |PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
show-env-1 |A=1
show-env-1 |B=2
show-env-1 |HOME=/root
INFO[0000] Container "test-show-env-1" exited
INFO[0000] All the containers have exited
INFO[0000] Stopping containers (forcibly)
INFO[0000] Stopping container test-show-env-1

Screenshots or logs

Actual result

FATA[0000] unknown shorthand flag: 'e' in -e
FATA[0000] exit status 1

Additional context

  • finch compose run (not up) command was successfully executed, and environment variables (A=1, B=2) were set.
$ finch compose run --env-file .env.test show-env

INFO[0000] Ensuring image busybox
INFO[0000] Creating container test-show-env-run-7d8df8b0049e
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
B=2
A=1
TERM=xterm
HOME=/root
INFO[0000] Stopping containers (forcibly)
INFO[0000] Stopping container test-show-env-run-7d8df8b0049e

To help debug the issue as quickly as possible, we recommend generating a support bundle with finch support-bundle generate and attaching it to this issue. This packages all Finch-related configs and logs into one file.
finch-support-20240407232422.zip

@nodematerial nodematerial added the bug Something isn't working label Apr 7, 2024
@mharwani mharwani assigned mharwani and Shubhranshu153 and unassigned mharwani Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants