Skip to content

Add --vmargs-path option to support custom vm.args file paths - #131

Draft
fhunleth with Copilot wants to merge 2 commits into
mainfrom
copilot/add-erlinit-conf-option-vm-args
Draft

Add --vmargs-path option to support custom vm.args file paths#131
fhunleth with Copilot wants to merge 2 commits into
mainfrom
copilot/add-erlinit-conf-option-vm-args

Conversation

Copilot AI commented Oct 8, 2025

Copy link
Copy Markdown

This PR adds a new --vmargs-path option to erlinit that allows users to specify a custom path to the vm.args file. This complements the existing --boot option and provides flexibility for deployments that need to use vm.args files in non-standard locations.

Changes

  • Added --vmargs-path command-line option that accepts a path to a vm.args file
  • Supports both absolute paths (e.g., /data/vm.args) and relative paths (e.g., custom.vm.args relative to the release version directory)
  • If the specified file exists, erlinit uses it
  • If the specified file doesn't exist, erlinit prints a warning and falls back to the default vm.args location in the release version directory

Implementation

The implementation follows the same pattern as the existing --boot option for consistency:

  1. Check if user specified a custom vmargs path
  2. Resolve absolute vs relative paths
  3. Verify the file exists
  4. Fall back to default location if not found, with a warning

Example Usage

In erlinit.config:

--vmargs-path
/data/custom.vm.args

Or on the command line:

erlinit --vmargs-path custom.vm.args

Testing

Added three comprehensive test cases:

  • 068_vmargs_path: Verifies a valid custom vm.args path (relative) works correctly
  • 069_vmargs_path_missing: Verifies fallback behavior when specified file doesn't exist
  • 070_vmargs_path_absolute: Verifies absolute path support

All 70 tests pass successfully.

Fixes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Add an erlinit.conf option to support passing a path for the vm.args</issue_title>
<issue_description>When the option is passed, erlinit should check that the file exists. If it does, it should use it. If it doesn't, it should print a warning and find the OTP release's vm.args instead.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #130

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add erlinit.conf option to support vm.args path Add --vmargs-path option to support custom vm.args file paths Oct 8, 2025
Copilot AI requested a review from fhunleth October 8, 2025 20:57
Copilot AI and others added 2 commits October 9, 2025 09:43
Co-authored-by: fhunleth <64669+fhunleth@users.noreply.github.com>
@fhunleth
fhunleth force-pushed the copilot/add-erlinit-conf-option-vm-args branch from 0eae10e to f3d7f6d Compare October 9, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an erlinit.conf option to support passing a path for the vm.args

2 participants