Skip to content

Commit 5b103ac

Browse files
Add CLI to path
1 parent f260a76 commit 5b103ac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88277,7 +88277,9 @@ class MacOSInstaller extends CliInstaller {
8827788277
const expandDir = "temp-pkg";
8827888278
await execAsync(`pkgutil --expand "${pkgWithExtension}" "${expandDir}"`);
8827988279
const payloadPath = external_path_.join(expandDir, "op.pkg", "Payload");
88280-
await tool_cache.extractTar(payloadPath);
88280+
const cliPath = await tool_cache.extractTar(payloadPath);
88281+
core.info(`Extracted CLI to '${cliPath}'`);
88282+
core.addPath(cliPath);
8828188283
external_fs_.rmSync(expandDir, { recursive: true, force: true });
8828288284
external_fs_.rmSync(pkgPath, { force: true });
8828388285
core.info("1Password CLI installed from MacOS .pkg");

src/cli-installer/macos.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export class MacOSInstaller extends CliInstaller implements Installer {
7777
const expandDir = "temp-pkg"
7878
await execAsync(`pkgutil --expand "${pkgWithExtension}" "${expandDir}"`);
7979
const payloadPath = path.join(expandDir, "op.pkg", "Payload");
80-
await tc.extractTar(payloadPath)
80+
const cliPath = await tc.extractTar(payloadPath)
81+
core.info(`Extracted CLI to '${cliPath}'`);
82+
core.addPath(cliPath);
8183
fs.rmSync(expandDir, { recursive: true, force: true });
8284
fs.rmSync(pkgPath, { force: true });
8385

0 commit comments

Comments
 (0)