Skip to content

Commit 52147ec

Browse files
committed
Revert a bunch of things
1 parent f2c9924 commit 52147ec

File tree

4 files changed

+9
-46
lines changed

4 files changed

+9
-46
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ on:
55
types: [opened, synchronize]
66

77
jobs:
8-
run-tests:
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
os: [ubuntu-latest, windows-latest, macos-latest]
13-
runs-on: ${{ matrix.os }}
8+
lint:
9+
runs-on: ubuntu-latest
1410

1511
steps:
1612
- name: Check out repository

workspaces/util/src/execWithArgs.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,7 @@ export function execWithArgs(
1717
): Promise<ExecWithArgsResult> {
1818
return new Promise((resolve, reject) => {
1919
const childProcess = spawn(command, args, {
20-
// TODO: share code between this callsite and spawnWithSafeStdio
21-
22-
// Without a shell specified, many comands seem to fail to spawn on
23-
// Windows. I verified that it's not a PATH issue. It seems like it's
24-
// probably https://github.com/nodejs/node-v0.x-archive/issues/5841
25-
...(process.platform === "win32" && {
26-
shell: "bash",
27-
windowsVerbatimArguments: true,
28-
}),
29-
3020
...options,
31-
3221
stdio: ["ignore", "pipe", "pipe"],
3322
});
3423

workspaces/util/src/readWorkspaces.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ import { getLines } from "@code-chronicles/util/getLines";
55
import { execWithArgsOrThrowOnNzec } from "@code-chronicles/util/execWithArgsOrThrowOnNzec";
66

77
export async function readWorkspaces(): Promise<string[]> {
8-
const yarnCommandResult = await execWithArgsOrThrowOnNzec(
9-
"yarn",
10-
["workspaces", "list", "--json"],
11-
{ env: { ...process.env, YARN_ENABLE_HARDENED_MODE: "0" } },
12-
);
13-
14-
console.log(yarnCommandResult);
8+
const yarnCommandResult = await execWithArgsOrThrowOnNzec("yarn", [
9+
"workspaces",
10+
"list",
11+
"--json",
12+
]);
1513

1614
return [...getLines(yarnCommandResult.stdout)]
1715
.map((line) => assertIsObject(JSON.parse(line)))

workspaces/util/src/spawnWithSafeStdio.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,14 @@
11
import process from "node:process";
22
import { spawn, type SpawnOptions } from "node:child_process";
33

4-
// TODO: audit callsites since the behavior changed recently
4+
// TODO: audit callsites since the behavior is changing
55

66
export function spawnWithSafeStdio(
77
command: string,
88
args: readonly string[],
99
options?: SpawnOptions,
1010
): Promise<void> {
1111
return new Promise((resolve, reject) => {
12-
console.log({
13-
command,
14-
args,
15-
options: {
16-
// When using "inherit" mode, it sometimes broke the interaction with
17-
// the actions/github-script@v7 GitHub Action, so we default to piping.
18-
stdio: ["ignore", "pipe", "pipe"],
19-
20-
// Without a shell specified, many comands seem to fail to spawn on
21-
// Windows. I verified that it's not a PATH issue. It seems like it's
22-
// probably https://github.com/nodejs/node-v0.x-archive/issues/5841
23-
...(process.platform === "win32" && { shell: "bash" }),
24-
25-
...options,
26-
},
27-
});
28-
2912
const childProcess = spawn(command, args, {
3013
// When using "inherit" mode, it sometimes broke the interaction with
3114
// the actions/github-script@v7 GitHub Action, so we default to piping.
@@ -34,10 +17,7 @@ export function spawnWithSafeStdio(
3417
// Without a shell specified, many comands seem to fail to spawn on
3518
// Windows. I verified that it's not a PATH issue. It seems like it's
3619
// probably https://github.com/nodejs/node-v0.x-archive/issues/5841
37-
...(process.platform === "win32" && {
38-
shell: "bash",
39-
windowsVerbatimArguments: true,
40-
}),
20+
...(process.platform === "win32" && { shell: options?.shell ?? "bash" }),
4121

4222
...options,
4323
});

0 commit comments

Comments
 (0)