fgrosse / prox

A process runner for Procfile-based applications
BSD 2-Clause "Simplified" License
13 stars 2 forks source link

Using Procfile.dev tries to parse as a Proxfile #6

Closed latortuga closed 3 months ago

latortuga commented 3 months ago

Hi there,

Just tried to start up prox using a file called Procfile.dev and I get the following output:

$ prox --procfile Procfile.dev
[ERROR] Failed to parse Procfile: failed to decode Proxfile as YAML: yaml: unmarshal errors:
  line 1: field web not found in type prox.Proxfile
  line 2: field worker not found in type prox.Proxfile
fgrosse commented 3 months ago

Hi Drew, the issue seems to be that prox is only trying to parse the Procfile format if the name exactly matches Procfile: https://github.com/fgrosse/prox/blob/main/cmd/prox/main.go#L106-L108

I'm currently rather busy but feel free to open a PR to change this to a prefix match instead if it helps your usecase :)

fgrosse commented 3 months ago

I just released v1.1.0 which includes the improved behavior.