mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #7813 from appwrite/fix-build-commands
Fix function build command
This commit is contained in:
@@ -394,7 +394,6 @@ class Builds extends Action
|
||||
]);
|
||||
|
||||
$command = $deployment->getAttribute('commands', '');
|
||||
$command = \str_replace('"', '\\"', $command);
|
||||
|
||||
$response = null;
|
||||
$err = null;
|
||||
@@ -403,7 +402,7 @@ class Builds extends Action
|
||||
Co\go(function () use ($executor, &$response, $project, $deployment, $source, $function, $runtime, $vars, $command, &$err) {
|
||||
try {
|
||||
$version = $function->getAttribute('version', 'v2');
|
||||
$command = $version === 'v2' ? 'tar -zxf /tmp/code.tar.gz -C /usr/code && cd /usr/local/src/ && ./build.sh' : 'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . $command . '"';
|
||||
$command = $version === 'v2' ? 'tar -zxf /tmp/code.tar.gz -C /usr/code && cd /usr/local/src/ && ./build.sh' : 'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . \trim(\escapeshellarg($command), "\'") . '"';
|
||||
|
||||
$response = $executor->createRuntime(
|
||||
deploymentId: $deployment->getId(),
|
||||
|
||||
Reference in New Issue
Block a user