lib/conf/install.js
function(version, cb) {
  var version_path = join(paths.versions, version),
      opts         = { env: process.env, cwd: version_path },
      args         = ['config', 'activate'];

  opts.env.UPGRADING_FROM = common.version;

  if (process.platform == 'win32') {
    var bin  = join(version_path, 'bin', 'node.exe');
    args     = [join('lib', 'conf', 'cli.js')].concat(args);
  } else {
    var bin  = join(version_path, 'bin', paths.bin);
  }

  run_synced(bin, args, opts, function(err, code) {
    if (!err && code === 0) return cb();

    shared.log('Failed. Rolling back!');

    // something went wrong while upgrading.
    // remove new package & undo pre_uninstall
    shared.version_manager.remove(version, function(er) {
      cb(er || err);
    });
  });
}
function(version, cb) {
  var version_path = join(paths.versions, version),
      opts         = { env: process.env, cwd: version_path },
      args         = ['config', 'activate'];

  opts.env.UPGRADING_FROM = common.version;

  if (process.platform == 'win32') {
    var bin  = join(version_path, 'bin', 'node.exe');
    args     = [join('lib', 'conf', 'cli.js')].concat(args);
  } else {
    var bin  = join(version_path, 'bin', paths.bin);
  }

  run_synced(bin, args, opts, function(err, code) {
    if (!err && code === 0) return cb();

    shared.log('Failed. Rolling back!');

    // something went wrong while upgrading.
    // remove new package & undo pre_uninstall
    shared.version_manager.remove(version, function(er) {
      cb(er || err);
    });
  });
}
function ( version , cb ) { var version_path = join ( paths . versions , version ) , opts = { env : process . env , cwd : version_path } , args = [ 'config' , 'activate' ] ; opts . env . UPGRADING_FROM = common . version ; if ( process . platform == 'win32' ) { var bin = join ( version_path , 'bin' , 'node.exe' ) ; args = [ join ( 'lib' , 'conf' , 'cli.js' ) ] . concat ( args ) ; } else { var bin = join ( version_path , 'bin' , paths . bin ) ; } run_synced ( bin , args , opts , function ( err , code ) { if ( ! err && code === 0 ) return cb ( ) ; shared . log ( 'Failed. Rolling back!' ) ; // something went wrong while upgrading. // remove new package & undo pre_uninstall shared . version_manager . remove ( version , function ( er ) { cb ( er || err ) ; } ) ; } ) ; }
calls 'prey config activate' on the new installation, so that it performs the activation using its own paths and logic. if it fails, roll back by removing it
calls prey config activate on the new installation so that it performs the activation using its own paths and logic . if it fails roll back by removing it