Skip to content

Commit 759371e

Browse files
committed
AAAAAH
1 parent 5d1d4cf commit 759371e

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

src/plugins.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export default class Plugins {
154154
this.debug(`installing plugin ${name}`)
155155
const options = {cwd: this.config.dataDir, logLevel: this.logLevel, prod: true}
156156
await this.ensurePJSON()
157+
console.log(`starting install: pjson is ${JSON.stringify(await this.pjson(), null, 2)}`)
157158
let plugin: Config
158159
const args = force ? ['--force'] : []
159160
if (name.includes(':')) {

test/integration/install.integration.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ describe('install/uninstall integration tests', () => {
5656
} catch {}
5757
})
5858

59-
beforeEach(() => {
59+
beforeEach(async () => {
6060
process.env.MYCLI_CACHE_DIR = cacheDir
6161
process.env.MYCLI_CONFIG_DIR = configDir
6262
process.env.MYCLI_DATA_DIR = dataDir
63+
await runCommand('plugins reset')
6364
})
6465

6566
afterEach(() => {
@@ -258,18 +259,12 @@ describe('install/uninstall integration tests', () => {
258259

259260
describe('legacy plugin', () => {
260261
it('should install legacy plugin', async () => {
261-
try {
262-
await runCommand('plugins install @oclif/plugin-legacy')
263-
await runCommand('plugins install @heroku-cli/plugin-ps-exec --silent')
264-
const {result, stdout} = await runCommand<Array<{ name: string }>>('plugins')
265-
console.log(`stdout is ${stdout}`)
266-
expect(stdout).to.contain('@heroku-cli/plugin-ps-exec')
267-
expect(result?.some((r) => r.name === '@heroku-cli/plugin-ps-exec')).to.be.true
268-
} catch (error) {
269-
const err: Error = error as Error;
270-
console.log(`ERR: ${err.name}; ${err.message}, ${err.stack}`)
271-
expect(true).to.equal(false, 'ERROR SHOULD NOT HAVE HAPPENED')
272-
}
262+
await runCommand('plugins install @oclif/plugin-legacy')
263+
await runCommand('plugins install @heroku-cli/plugin-ps-exec --silent')
264+
const {result, stdout} = await runCommand<Array<{ name: string }>>('plugins')
265+
console.log(`stdout is ${stdout}`)
266+
expect(stdout).to.contain('@heroku-cli/plugin-ps-exec')
267+
expect(result?.some((r) => r.name === '@heroku-cli/plugin-ps-exec')).to.be.true
273268
})
274269
})
275270
})

0 commit comments

Comments
 (0)