From 45f6d5fdf6fa17f535a7d5458f9f68827147b708 Mon Sep 17 00:00:00 2001 From: kp2pml30 Date: Wed, 5 Feb 2025 01:11:48 +0400 Subject: [PATCH] allow multiple files for target_command --- ya-build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ya-build b/ya-build index 6da7813..6eb24d7 100755 --- a/ya-build +++ b/ya-build @@ -162,7 +162,10 @@ module DefaultTargets class Command < Target attr_reader :output_file def initialize(output_file, dependencies, cwd, commands, depfile, pool, env) - super(outputs: [output_file], inputs: dependencies, rule: 'CUSTOM_COMMAND') + if not output_file.kind_of? Array + output_file = [output_file] + end + super(outputs: output_file, inputs: dependencies, rule: 'CUSTOM_COMMAND') @env = env @depfile = depfile @output_file = output_file