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

Overman fails to start if unrecognised flag is passed to it #3

Open
dombarnes opened this issue Jan 21, 2024 · 1 comment
Open

Overman fails to start if unrecognised flag is passed to it #3

dombarnes opened this issue Jan 21, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dombarnes
Copy link

Working example:
overman start -f Procfile.dev

Not working - shows no output. Never exits
overman start -o -f Procfile.dev

Expected Behaviour: Overman ignores the flag, or throws an unrecognised flag error.

Version: 0.87.3
Ruby: 3.2.2

@dentarg dentarg added bug Something isn't working help wanted Extra attention is needed labels Jan 22, 2024
@dentarg
Copy link
Member

dentarg commented Dec 17, 2024

I just made a very similar mistake, passing my env file as the Procfile, also never exits

$ overman start -f default.env
^Ccomparison of NilClass with 6 failed
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine/cli.rb:80:in `name_padding'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine/cli.rb:85:in `pad_process_name'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine/cli.rb:61:in `block in output'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine/cli.rb:57:in `each'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine/cli.rb:57:in `output'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:335:in `block in output_with_mutex'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:334:in `synchronize'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:334:in `output_with_mutex'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:340:in `system'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:124:in `handle_interrupt'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:104:in `handle_signal'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:389:in `handle_signals'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:412:in `block (2 levels) in watch_for_output'
<internal:kernel>:187:in `loop'
/Users/dentarg/.arm64_rubies/3.3.5/lib/ruby/gems/3.3.0/gems/overman-0.87.3/lib/foreman/engine.rb:409:in `block in watch_for_output'
^C
^C

It is also weird that overman start --help doesn't work (but overman --help does)

$ overman --help
Commands:
  overman check                   # Validate your application's Procfile
  overman export FORMAT LOCATION  # Export the application to another process management format
  overman help [COMMAND]          # Describe available commands or one specific command
  overman run COMMAND [ARGS...]   # Run a command using your application's environment
  overman start [PROCESS]         # Start the application (or a specific PROCESS)
  overman version                 # Display Foreman gem version

Options:
  -f, [--procfile=PROCFILE]  # Default: Procfile
  -d, [--root=ROOT]          # Default: Procfile directory
$ overman start --help
^C07:52:20 system | SIGINT received, starting shutdown
^C07:52:20 system | SIGINT received, starting shutdown
07:52:20 system | sending SIGTERM to all processes
$ overman help start
Usage:
  overman start [PROCESS]

Options:
  -c, [--color], [--no-color]          # Force color to be enabled
  -e, [--env=ENV]                      # Specify an environment file to load, defaults to .env
  -m, [--formation="alpha=5,bar=3"]    # Specify what processes will run and how many. Default: "all=1"
  -p, [--port=N]
  -t, [--timeout=N]                    # Specify the amount of time (in seconds) processes have to shutdown gracefully before receiving a SIGKILL, defaults to 5.
      [--timestamp], [--no-timestamp]  # Include timestamp in output
                                       # Default: true
  -f, [--procfile=PROCFILE]            # Default: Procfile
  -d, [--root=ROOT]                    # Default: Procfile directory

Start the application (or a specific PROCESS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants