-
Notifications
You must be signed in to change notification settings - Fork 650
Open
Description
When using custom config files with the --config-file option combined with the -d (destination) flag, Kamal hardcodes the .yml extension for destination-specific config files, regardless of the base config file's extension.
Current Behavior
If you use a config file with .yaml extension:
kamal deploy --config-file my-app.yaml -d stagingKamal will:
- Load
my-app.yaml✅ (works correctly) - Look for
my-app.staging.yml❌ (hardcoded .yml extension)
This inconsistency means users must use different extensions for their base and destination files when using .yaml.
Expected Behavior
The destination config file should preserve the same extension as the base config file:
- Base file:
my-app.yaml→ Destination file:my-app.staging.yaml - Base file:
my-app.yml→ Destination file:my-app.staging.yml
Root Cause
In lib/kamal/configuration.rb:42, the destination_config_file method hardcodes the .yml extension:
def destination_config_file(base_config_file, destination)
base_config_file.sub_ext(".#{destination}.yml") if destination # ❌ hardcoded .yml
endMetadata
Metadata
Assignees
Labels
No labels