@@ -54,21 +54,22 @@ async function ignoreError(fn: () => Promise<any> | any): Promise<void> {
5454
5555// Oclif has a bug where the installer doesn't clear out the auto-updater location. This causes older versions
5656// to be re-used even with a clean install
57+ // Comment this out because it does not work with MacOS notary tool. It fails verification
5758async function patchMacOsInstallers ( ) {
58- console . log ( chalk . magenta ( 'Patching MacOS installers with bug fix' ) )
59-
60- const pkgFolder = './.build/dist/macos' ;
61- const files = await fs . readdir ( pkgFolder )
62- const pkgFiles = files . filter ( ( name ) => name . endsWith ( '.pkg' ) )
63-
64- for ( const pkgFile of pkgFiles ) {
65- const pkgPath = path . join ( pkgFolder , pkgFile ) ;
66- const tmpPath = path . join ( pkgFolder , 'tmp' ) ;
67-
68- execSync ( `pkgutil --expand ${ pkgPath } ${ tmpPath } ` )
69- await fs . appendFile ( path . join ( tmpPath , 'Scripts' , 'preinstall' ) , '\nsudo rm -rf ~/.local/share/codify' , 'utf8' ) ;
70- execSync ( `pkgutil --flatten ${ tmpPath } ${ pkgPath } ` )
71- execSync ( `rm -rf ${ tmpPath } ` ) ;
72- console . log ( chalk . magenta ( `Done patching installer ${ pkgFile } ` ) )
73- }
59+ // console.log(chalk.magenta('Patching MacOS installers with bug fix'))
60+ //
61+ // const pkgFolder = './.build/dist/macos';
62+ // const files = await fs.readdir(pkgFolder)
63+ // const pkgFiles = files.filter((name) => name.endsWith('.pkg'))
64+ //
65+ // for (const pkgFile of pkgFiles) {
66+ // const pkgPath = path.join(pkgFolder, pkgFile);
67+ // const tmpPath = path.join(pkgFolder, 'tmp');
68+ //
69+ // execSync(`pkgutil --expand ${pkgPath} ${tmpPath}`)
70+ // await fs.appendFile(path.join(tmpPath, 'Scripts', 'preinstall'), '\nsudo rm -rf ~/.local/share/codify', 'utf8');
71+ // execSync(`pkgutil --flatten ${tmpPath} ${pkgPath} `)
72+ // execSync(`rm -rf ${tmpPath}`);
73+ // console.log(chalk.magenta(`Done patching installer ${pkgFile}`))
74+ // }
7475}
0 commit comments