From 9e04ccd7c8ec73cc3f573c32d1eeca34a7ee9a3b Mon Sep 17 00:00:00 2001 From: "PROD\\CGriffit" Date: Tue, 3 Dec 2024 16:13:37 +0100 Subject: [PATCH] Test --- .github/workflows/npm-build.yml | 2 +- imxweb/install-local-packages.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index 99f8477fe..e95493f29 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: # Currently only can run ubuntu on github agents, windows isn't correctly installing packages - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] node-version: [20.x] steps: diff --git a/imxweb/install-local-packages.js b/imxweb/install-local-packages.js index 5296c4d86..9c879a9e3 100644 --- a/imxweb/install-local-packages.js +++ b/imxweb/install-local-packages.js @@ -1,12 +1,12 @@ const child_process = require('child_process'); const fs = require('fs'); -const path = require('upath'); +const path = require('path'); const readline = require('readline').createInterface({ input: process.stdin, output: process.stdout }); // --skip-dialog will auto overwrite feeds if imx-modules are present -const isWin = process.platform === 'win32'; +let isWin = process.platform === 'win32'; const imxDir = 'imx-modules'; const question = (str) => new Promise((resolve) => readline.question(str, resolve)); const steps = { @@ -47,7 +47,7 @@ function overwrite() { filePath = isWin ? path.join(imxDir, file) : path.join(__dirname, imxDir, file); if (file.includes('imx-')) { const baseName = path.parse(file).name; - installArg += ['@', path.join(imxDir, baseName), '@', filePath, ' '].join(''); + installArg += ['@', imxDir, '/', baseName, '@', filePath, ' '].join(''); } else if (file.includes('cadence-icon')) { installArg += ['@elemental-ui/cadence-icon@', filePath, ' '].join(''); } else if (file.includes('core')) { @@ -56,6 +56,7 @@ function overwrite() { console.log(filePath); }); + console.log(`Running command npm i ${installArg} --save=false`); const child = child_process.spawnSync('npm', ['i', installArg, '--save=false'], { encoding: 'utf8', shell: true,