From f37a618a8c9d8a10dd6857c5f5b1839edcf3a17e Mon Sep 17 00:00:00 2001 From: braffolk Date: Fri, 8 Dec 2023 02:36:37 +0200 Subject: [PATCH] Update file imports and fix installer command --- .../rsc_unix/filter-unautomatable-test-results.js | 10 +++++----- packages/launcher/src/lib/utility.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rsc_unix/filter-unautomatable-test-results.js b/.github/workflows/rsc_unix/filter-unautomatable-test-results.js index 935be2f1..cf495db3 100644 --- a/.github/workflows/rsc_unix/filter-unautomatable-test-results.js +++ b/.github/workflows/rsc_unix/filter-unautomatable-test-results.js @@ -1,14 +1,14 @@ -const fs = require('fs'); +import { readdirSync, existsSync, readFile, writeFile } from 'fs'; // process all paths matching: ./packages/*/test-results.json -const testResultsPaths = fs.readdirSync('./packages') +const testResultsPaths = readdirSync('./packages') .map(path => `./packages/${path}/test-results.json`) - .filter(path => fs.existsSync(path)); + .filter(path => existsSync(path)); testResultsPaths.forEach(parseTestResults); function parseTestResults(testResultsPath) { - fs.readFile(testResultsPath, 'utf8', (err, data) => { + readFile(testResultsPath, 'utf8', (err, data) => { if (err) { console.error('Error reading the test results file:', err); return; @@ -23,7 +23,7 @@ function parseTestResults(testResultsPath) { return !test.err || !test.err.message.includes('No user is logged in'); }); - fs.writeFile(testResultsPath, JSON.stringify(results, null, 2), 'utf8', writeErr => { + writeFile(testResultsPath, JSON.stringify(results, null, 2), 'utf8', writeErr => { if (writeErr) { console.error('Error writing the processed test results:', writeErr); } else { diff --git a/packages/launcher/src/lib/utility.ts b/packages/launcher/src/lib/utility.ts index 65fcdd86..4d7d36b4 100644 --- a/packages/launcher/src/lib/utility.ts +++ b/packages/launcher/src/lib/utility.ts @@ -204,7 +204,7 @@ export async function runIdeInstaller(idePath: Pathy) { // Use sudo, as otherwise the installer can seemingly randomly fail, // when it tries to write to /Applications // Sudo will instead ask for the user's password, which is fine. - command = `installer -verbose -pkg "${idePath.absolute}" -target CurrentUserHomeDirectory`; + command = `installer -verboseR -pkg "${idePath.absolute}" -target CurrentUserHomeDirectory`; } debug(`Running command: ${command}`); const installer = exec(command);