Skip to content

Commit 7aff2b4

Browse files
committed
Disable test on push. Homebrew fixes
1 parent f223b8b commit 7aff2b4

6 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/run-all-tests-cron-linux.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Test all cron (Linux)
55

66
on:
7-
push:
7+
# push:
88
pull_request:
99
branches:
1010
- release

.github/workflows/run-all-tests-cron-macos.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Test all cron (MacOS)
55

66
on:
7-
push:
7+
# push:
88
pull_request:
99
branches:
1010
- release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "default",
3-
"version": "1.1.0",
3+
"version": "1.1.0-beta1",
44
"description": "Default plugin for Codify - provides 50+ declarative resources for managing development tools and system configuration across macOS and Linux",
55
"main": "dist/index.js",
66
"scripts": {

src/resources/homebrew/homebrew.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class HomebrewResource extends Resource<HomebrewConfig> {
100100

101101
await $.spawn(
102102
'/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',
103-
{ stdin: true, env: { NONINTERACTIVE: 1 } }
103+
{ stdin: true, interactive: true, env: { INTERACTIVE: 1, NONINTERACTIVE: undefined } }
104104
)
105105

106106
const brewPath = Utils.isLinux() ? '/home/linuxbrew/.linuxbrew/bin/brew' : '/opt/homebrew/bin/brew';
@@ -124,7 +124,7 @@ export class HomebrewResource extends Resource<HomebrewConfig> {
124124
if (homebrewDirectory === '/opt/homebrew') {
125125
await $.spawnSafe(
126126
'/bin/bash -c "$(/usr/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"',
127-
{ stdin: true, env: { NONINTERACTIVE: 1 } }
127+
{ stdin: true, interactive: true, env: { INTERACTIVE: 1 } }
128128
)
129129
} else {
130130
await $.spawn(`rm -rf ${homebrewDirectory}`, { requiresRoot: true });

src/resources/homebrew/tap-parameter.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class TapsParameter extends StatefulParameter<HomebrewConfig, string[]> {
1717
if (tapsQuery.status === SpawnStatus.SUCCESS && tapsQuery.data !== null && tapsQuery.data !== undefined) {
1818
return tapsQuery.data
1919
.split('\n')
20+
.filter((t) => t === 'homebrew/bundle' || t === 'homebrew/services')
2021
.filter(Boolean)
2122
}
2223

@@ -45,10 +46,12 @@ export class TapsParameter extends StatefulParameter<HomebrewConfig, string[]> {
4546
}
4647

4748
const $ = getPty();
48-
await $.spawn(`brew tap ${taps.join(' ')}`, {
49-
interactive: true,
50-
env: { HOMEBREW_NO_AUTO_UPDATE: 1 },
51-
})
49+
for (const tap of taps) {
50+
await $.spawn(`brew tap ${tap}`, {
51+
interactive: true,
52+
env: { HOMEBREW_NO_AUTO_UPDATE: 1 },
53+
});
54+
}
5255
}
5356

5457
private async uninstallTaps(taps: string[]): Promise<void> {
@@ -57,10 +60,12 @@ export class TapsParameter extends StatefulParameter<HomebrewConfig, string[]> {
5760
}
5861

5962
const $ = getPty();
60-
await $.spawn(`brew untap ${taps.join(' ')}`, {
61-
interactive: true,
62-
env: { HOMEBREW_NO_AUTO_UPDATE: 1 },
63-
})
63+
for (const tap of taps) {
64+
await $.spawn(`brew untap ${tap}`, {
65+
interactive: true,
66+
env: { HOMEBREW_NO_AUTO_UPDATE: 1 },
67+
});
68+
}
6469
}
6570

6671
}

test/homebrew/taps.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Homebrew taps tests', { skip: !Utils.isMacOS() }, () => {
1111
// Plans correctly and detects that brew is not installed
1212
await PluginTester.fullTest(pluginPath, [{
1313
type: 'homebrew',
14-
taps: ['cirruslabs/cli'],
14+
taps: ['cirruslabs/cli', 'hashicorp/tap'],
1515
}], {
1616
validateApply: async () => {
1717
expect(await testSpawn('brew tap')).toMatchObject({ data: expect.stringContaining('cirruslabs/cli') });

0 commit comments

Comments
 (0)