mirror of
git://f0xx.org/ac/ac-ms-build
synced 2026-07-29 01:38:00 +03:00
fix(build): correct OTA channel JSON copy in publishOta
Stop embedding shell redirection inside escapeshellarg and skip copy when the channel file is missing. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -537,7 +537,15 @@ YAML;
|
||||
$dest = $mount . '/v0';
|
||||
shell_exec('mkdir -p ' . escapeshellarg($dest) . ' && cp -a ' . escapeshellarg($src . '/.') . ' ' . escapeshellarg($dest . '/'));
|
||||
if ($channel !== '' && $channel !== 'staging') {
|
||||
shell_exec('cp -a ' . escapeshellarg($src . '/ota/channel/' . $channel . '.json') . ' ' . escapeshellarg($dest . '/ota/channel/' . $channel . '.json 2>/dev/null'));
|
||||
$channelJson = $src . '/ota/channel/' . $channel . '.json';
|
||||
if (is_file($channelJson)) {
|
||||
shell_exec(
|
||||
'cp -a '
|
||||
. escapeshellarg($channelJson)
|
||||
. ' '
|
||||
. escapeshellarg($dest . '/ota/channel/' . $channel . '.json')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user