@@ -47,7 +47,7 @@ async function dockerBuild(func, variables) {
4747 const runtimeName = runtimeChunks.join("-");
4848 const imageName = `openruntimes/${runtimeName}:${openRuntimesVersion}-${runtimeVersion}`;
4949
50- const functionDir = path.join(localConfig.dirname (), func.path);
50+ const functionDir = path.join(localConfig.getDirname (), func.path);
5151
5252 const id = func.$id;
5353
@@ -124,7 +124,7 @@ async function dockerBuild(func, variables) {
124124 return;
125125 }
126126
127- const copyPath = path.join(localConfig.dirname (), func.path, '.appwrite', 'build.tar.gz');
127+ const copyPath = path.join(localConfig.getDirname (), func.path, '.appwrite', 'build.tar.gz');
128128 const copyDir = path.dirname(copyPath);
129129 if (!fs.existsSync(copyDir)) {
130130 fs.mkdirSync(copyDir, { recursive: true });
@@ -143,7 +143,7 @@ async function dockerBuild(func, variables) {
143143
144144 await dockerStop(id);
145145
146- const tempPath = path.join(localConfig.dirname (), func.path, 'code.tar.gz');
146+ const tempPath = path.join(localConfig.getDirname (), func.path, 'code.tar.gz');
147147 if (fs.existsSync(tempPath)) {
148148 fs.rmSync(tempPath, { force: true });
149149 }
@@ -153,7 +153,7 @@ async function dockerBuild(func, variables) {
153153
154154async function dockerStart(func, variables, port) {
155155 // Pack function files
156- const functionDir = path.join(localConfig.dirname (), func.path);
156+ const functionDir = path.join(localConfig.getDirname (), func.path);
157157
158158 const runtimeChunks = func.runtime.split("-");
159159 const runtimeVersion = runtimeChunks.pop();
@@ -211,12 +211,12 @@ async function dockerCleanup(functionId) {
211211 await dockerStop(functionId);
212212
213213 const func = localConfig.getFunction(functionId);
214- const appwritePath = path.join(localConfig.dirname (), func.path, '.appwrite');
214+ const appwritePath = path.join(localConfig.getDirname (), func.path, '.appwrite');
215215 if (fs.existsSync(appwritePath)) {
216216 fs.rmSync(appwritePath, { recursive: true, force: true });
217217 }
218218
219- const tempPath = path.join(localConfig.dirname (), func.path, 'code.tar.gz');
219+ const tempPath = path.join(localConfig.getDirname (), func.path, 'code.tar.gz');
220220 if (fs.existsSync(tempPath)) {
221221 fs.rmSync(tempPath, { force: true });
222222 }
0 commit comments