target_append fails when no initial --target arguments exist
Working on ricochet-build
, I have a release
project which has no targets, and then adds the outputs of a package
output for each target platform like so:
input_files:
# linux
- name: linux-i686
project: package
target_append:
- linux
- linux-i686
- name: linux-x86_64
project: package
target_append:
- linux
- linux-x86_64
# macos
- name: macos-x86_64
project: package
target_append:
- macos
- macos-x86_64
- name: macos-aarch64
project: package
target_append:
- macos
- macos-aarch64
# windows
- name: windows-i686
project: package
target_append:
- windows
- windows-i686
- name: windows-x86_64
project: package
target_append:
- windows
- windows-x86_64
I'm using target_append
here so that I can have both signed and unsigned releases built out of ricochet-build
. My intention is to build a signed release by:
$ ./rbm/rbm build release --target signed
However if I'm building an unsigned release I was doing (before I changed the various target
vars to target_append
):
$ ./rbm/rbm build release
Now this fails with:
undef error - Can't use an undefined value as an ARRAY refernece at rbm/lib/RBM.pm line 933
because of this snippet:
if ($input_file->{target_append}) {
$input_file->{target} = [ @{$input_file->{target}},
@{ process_template_opt($project,
$input_file->{target_append},
$options) } ];
}
This is not a blocker to me since I'm going to a additional targets for the release channel (stable vs alpha) and in the short term I can just add a dummy target to initialize the list.