Skip to content

Commit

Permalink
Update file imports and fix installer command
Browse files Browse the repository at this point in the history
  • Loading branch information
Braffolk committed Dec 8, 2023
1 parent 6575bf5 commit f37a618
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/rsc_unix/filter-unautomatable-test-results.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion packages/launcher/src/lib/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f37a618

Please sign in to comment.