Skip to content

Commit

Permalink
fix: use correct path for verifying install (#695)
Browse files Browse the repository at this point in the history
* fix: use correct path for verifying install

* chore: revert linting fix
  • Loading branch information
mdonnalley authored Feb 24, 2023
1 parent c40f9fa commit c41a0a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/cli/tarballs/smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class SmokeTest extends SfCommand<void> {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
this.log(err.stderr);
} finally {
const result = await this.verifyInstall(plugin, true);
const result = await this.verifyInstall(plugin, executable, true);
if (result) {
this.log(`✅ ${chalk.green(`Verified installation of ${plugin}\n`)}`);
} else {
Expand All @@ -132,12 +132,12 @@ export default class SmokeTest extends SfCommand<void> {

private async testInstall(executable: string, plugin: string, tag?: string): Promise<void> {
await this.execute(executable, `plugins:install ${plugin}${tag ? `@${tag}` : ''}`);
await this.verifyInstall(plugin);
await this.verifyInstall(plugin, executable);
}

private async verifyInstall(plugin: string, silent = false): Promise<boolean> {
private async verifyInstall(plugin: string, executable: string, silent = false): Promise<boolean> {
const fileData = await fs.promises.readFile(
path.join(os.homedir(), '.local', 'share', this.flags.cli, 'package.json'),
path.join(os.homedir(), '.local', 'share', path.basename(executable), 'package.json'),
'utf-8'
);
const packageJson = parseJson(fileData) as PackageJson;
Expand Down

0 comments on commit c41a0a5

Please sign in to comment.