From bef34c8f91567dc3d0f0ee0a18641f709cf4e2ab Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" <12751435+giautm@users.noreply.github.com> Date: Wed, 3 Jul 2024 01:44:32 +0700 Subject: [PATCH] shim: fixed the path for atlas-binary (#186) --- migrate/apply/dist/index.js | 2 +- migrate/down/dist/index.js | 2 +- migrate/lint/dist/index.js | 2 +- migrate/push/dist/index.js | 2 +- migrate/test/dist/index.js | 2 +- schema/test/dist/index.js | 2 +- shim/index.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/migrate/apply/dist/index.js b/migrate/apply/dist/index.js index f4880550..56a2ea80 100644 --- a/migrate/apply/dist/index.js +++ b/migrate/apply/dist/index.js @@ -10505,7 +10505,7 @@ module.exports = async function run(action) { // Add tool to path if not in local mode let mainCommand = 'atlas-action'; if (toolPath) { - mainCommand = path.join(process.cwd(), mainCommand); + mainCommand = path.join(toolPath, mainCommand); } const args = ['--action', action]; diff --git a/migrate/down/dist/index.js b/migrate/down/dist/index.js index 92c518d8..7aa9c1b8 100644 --- a/migrate/down/dist/index.js +++ b/migrate/down/dist/index.js @@ -10505,7 +10505,7 @@ module.exports = async function run(action) { // Add tool to path if not in local mode let mainCommand = 'atlas-action'; if (toolPath) { - mainCommand = path.join(process.cwd(), mainCommand); + mainCommand = path.join(toolPath, mainCommand); } const args = ['--action', action]; diff --git a/migrate/lint/dist/index.js b/migrate/lint/dist/index.js index 312ac9a0..7f98e6da 100644 --- a/migrate/lint/dist/index.js +++ b/migrate/lint/dist/index.js @@ -10505,7 +10505,7 @@ module.exports = async function run(action) { // Add tool to path if not in local mode let mainCommand = 'atlas-action'; if (toolPath) { - mainCommand = path.join(process.cwd(), mainCommand); + mainCommand = path.join(toolPath, mainCommand); } const args = ['--action', action]; diff --git a/migrate/push/dist/index.js b/migrate/push/dist/index.js index f99f5e01..778a22e1 100644 --- a/migrate/push/dist/index.js +++ b/migrate/push/dist/index.js @@ -10505,7 +10505,7 @@ module.exports = async function run(action) { // Add tool to path if not in local mode let mainCommand = 'atlas-action'; if (toolPath) { - mainCommand = path.join(process.cwd(), mainCommand); + mainCommand = path.join(toolPath, mainCommand); } const args = ['--action', action]; diff --git a/migrate/test/dist/index.js b/migrate/test/dist/index.js index f094504b..747bfb9d 100644 --- a/migrate/test/dist/index.js +++ b/migrate/test/dist/index.js @@ -10505,7 +10505,7 @@ module.exports = async function run(action) { // Add tool to path if not in local mode let mainCommand = 'atlas-action'; if (toolPath) { - mainCommand = path.join(process.cwd(), mainCommand); + mainCommand = path.join(toolPath, mainCommand); } const args = ['--action', action]; diff --git a/schema/test/dist/index.js b/schema/test/dist/index.js index d3719e08..a05950a8 100644 --- a/schema/test/dist/index.js +++ b/schema/test/dist/index.js @@ -10505,7 +10505,7 @@ module.exports = async function run(action) { // Add tool to path if not in local mode let mainCommand = 'atlas-action'; if (toolPath) { - mainCommand = path.join(process.cwd(), mainCommand); + mainCommand = path.join(toolPath, mainCommand); } const args = ['--action', action]; diff --git a/shim/index.js b/shim/index.js index 7f9092d3..0073dc46 100644 --- a/shim/index.js +++ b/shim/index.js @@ -53,7 +53,7 @@ module.exports = async function run(action) { // Add tool to path if not in local mode let mainCommand = 'atlas-action'; if (toolPath) { - mainCommand = path.join(process.cwd(), mainCommand); + mainCommand = path.join(toolPath, mainCommand); } const args = ['--action', action];