From 65e9053a99912c9550e639d1e7f299d01ef6448c Mon Sep 17 00:00:00 2001 From: Winford Date: Sat, 1 Jun 2024 20:30:43 -0700 Subject: [PATCH] Fix bug in `packbeam create` Fixes bug in `packbeam create` command that casues the creation to fail if the `application_module` is not defined, due to not utilizing the default options. Signed-off-by: Winford --- src/packbeam.erl | 2 +- src/packbeam_api.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packbeam.erl b/src/packbeam.erl index 62102bd..425b980 100644 --- a/src/packbeam.erl +++ b/src/packbeam.erl @@ -184,7 +184,7 @@ do_create(Opts, Args) -> OutputFile, InputFiles, #{ prune => maps:get(prune, Opts, false), - start => maps:get(start, Opts, undefined), + start_module => maps:get(start_module, Opts, undefined), include_lines => not maps:get(remove_lines, Opts, false) } ), diff --git a/src/packbeam_api.erl b/src/packbeam_api.erl index 3303dee..1f93d2b 100644 --- a/src/packbeam_api.erl +++ b/src/packbeam_api.erl @@ -120,7 +120,7 @@ create(OutputPath, InputPaths, Options) -> start_module := StartModule, application_module := ApplicationModule, include_lines := IncludeLines - } = Options, + } = maps:merge(?DEFAULT_OPTIONS, Options), ParsedFiles = parse_files(InputPaths, StartModule, IncludeLines), write_packbeam( OutputPath,