src/extensions/default/AutoUpdate/main.js
function () {
            var infoObj = {
                installerPath: formattedInstallerPath,
                logFilePath: formattedLogFilePath,
                installStatusFilePath: installStatusFilePath
            };

            if (brackets.platform === "mac") {
                var additionalParams = getAdditionalParams(),
                    key;

                for (key in additionalParams) {
                    if (additionalParams.hasOwnProperty(key)) {
                        infoObj[key] = additionalParams[key];
                    }
                }
            }

            // Set update parameters for app update
            if (brackets.app.setUpdateParams) {
                brackets.app.setUpdateParams(JSON.stringify(infoObj), function (err) {
                    if (err) {
                        resetStateInFailure("AutoUpdate : Update parameters could not be set for the installer. Error encountered: " + err);
                    } else {
                        setAppQuitHandler();
                        CommandManager.execute(Commands.FILE_QUIT);
                    }
                });
            } else {
                resetStateInFailure("AutoUpdate : setUpdateParams could not be found in shell");
            }
        }
function () {
            var infoObj = {
                installerPath: formattedInstallerPath,
                logFilePath: formattedLogFilePath,
                installStatusFilePath: installStatusFilePath
            };

            if (brackets.platform === "mac") {
                var additionalParams = getAdditionalParams(),
                    key;

                for (key in additionalParams) {
                    if (additionalParams.hasOwnProperty(key)) {
                        infoObj[key] = additionalParams[key];
                    }
                }
            }

            // Set update parameters for app update
            if (brackets.app.setUpdateParams) {
                brackets.app.setUpdateParams(JSON.stringify(infoObj), function (err) {
                    if (err) {
                        resetStateInFailure("AutoUpdate : Update parameters could not be set for the installer. Error encountered: " + err);
                    } else {
                        setAppQuitHandler();
                        CommandManager.execute(Commands.FILE_QUIT);
                    }
                });
            } else {
                resetStateInFailure("AutoUpdate : setUpdateParams could not be found in shell");
            }
        }
function ( ) { var infoObj = { installerPath : formattedInstallerPath , logFilePath : formattedLogFilePath , installStatusFilePath : installStatusFilePath } ; if ( brackets . platform === "mac" ) { var additionalParams = getAdditionalParams ( ) , key ; for ( key in additionalParams ) { if ( additionalParams . hasOwnProperty ( key ) ) { infoObj [ key ] = additionalParams [ key ] ; } } } // Set update parameters for app update if ( brackets . app . setUpdateParams ) { brackets . app . setUpdateParams ( JSON . stringify ( infoObj ) , function ( err ) { if ( err ) { resetStateInFailure ( "AutoUpdate : Update parameters could not be set for the installer. Error encountered: " + err ) ; } else { setAppQuitHandler ( ) ; CommandManager . execute ( Commands . FILE_QUIT ) ; } } ) ; } else { resetStateInFailure ( "AutoUpdate : setUpdateParams could not be found in shell" ) ; } }
Update function, to carry out app update
Update function to carry out app update