File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -88262,10 +88262,16 @@ class MacOSInstaller extends CliInstaller {
8826288262 }
8826388263 const downloadPath = await tool_cache.downloadTool(downloadUrl);
8826488264 core.info(`Installing 1Password CLI using MacOS .pkg installer: ${downloadPath}`);
88265- const { stderr } = await execAsync(`sudo installer -pkg ${downloadPath}/op_apple_universal_${this.version}.pkg -target /`);
88265+ const { stdout, stderr } = await execAsync(`ls -la ${downloadPath}`);
88266+ core.info(`Listing downloaded file: ${stdout}`);
8826688267 if (stderr) {
8826788268 core.error(stderr);
88268- throw new Error(`Failed to install 1Password CLI: ${stderr}`);
88269+ throw new Error(`Failed to run 'ls -la': ${stderr}`);
88270+ }
88271+ const { stderr: err } = await execAsync(`sudo installer -pkg ${downloadPath}/op_apple_universal_${this.version}.pkg -target /`);
88272+ if (err) {
88273+ core.error(err);
88274+ throw new Error(`Failed to install 1Password CLI: ${err}`);
8826988275 }
8827088276 core.info("1Password CLI installed from MacOS .pkg");
8827188277 }
Original file line number Diff line number Diff line change @@ -68,12 +68,19 @@ export class MacOSInstaller extends CliInstaller implements Installer {
6868
6969 const downloadPath = await tc . downloadTool ( downloadUrl ) ;
7070 core . info ( `Installing 1Password CLI using MacOS .pkg installer: ${ downloadPath } ` ) ;
71- const { stderr } = await execAsync (
72- `sudo installer -pkg ${ downloadPath } /op_apple_universal_${ this . version } .pkg -target /` ,
73- ) ;
71+ const { stdout, stderr } = await execAsync ( `ls -la ${ downloadPath } ` ) ;
72+ core . info ( `Listing downloaded file: ${ stdout } ` ) ;
7473 if ( stderr ) {
7574 core . error ( stderr ) ;
76- throw new Error ( `Failed to install 1Password CLI: ${ stderr } ` ) ;
75+ throw new Error ( `Failed to run 'ls -la': ${ stderr } ` ) ;
76+ }
77+
78+ const { stderr : err } = await execAsync (
79+ `sudo installer -pkg ${ downloadPath } /op_apple_universal_${ this . version } .pkg -target /` ,
80+ ) ;
81+ if ( err ) {
82+ core . error ( err ) ;
83+ throw new Error ( `Failed to install 1Password CLI: ${ err } ` ) ;
7784 }
7885
7986 core . info ( "1Password CLI installed from MacOS .pkg" ) ;
You can’t perform that action at this time.
0 commit comments