fix: add wget to nixpacks builds

This commit is contained in:
Andras Bacsai 2024-05-23 13:08:46 +02:00
parent df9ec711c5
commit d35cb5d072

View File

@ -1257,6 +1257,15 @@ private function generate_nixpacks_confs()
// Do any modifications here
$this->generate_env_variables();
$merged_envs = $this->env_args->merge(collect(data_get($parsed, 'variables', [])));
$aptPkgs = data_get($parsed, 'phases.setup.aptPkgs');
// add curl and wget if not found in the array
if (!in_array('curl', $aptPkgs)) {
$aptPkgs[] = 'curl';
}
if (!in_array('wget', $aptPkgs)) {
$aptPkgs[] = 'wget';
}
data_set($parsed, 'phases.setup.aptPkgs', $aptPkgs);
data_set($parsed, 'variables', $merged_envs->toArray());
$this->nixpacks_plan = json_encode($parsed, JSON_PRETTY_PRINT);
}