 					if app.environment_variable?
 						_.extend(env, app.environment_variable)
 					remoteAppEnvs[app.id] = env
+					env = _.pick env, (val, key) ->
+						!_.includes(key, _.keys(specialActionEnvVars))
 					return {
 						appId: '' + app.id
 						commit: app.commit

		err.message or err
	"#{failures.length} error#{s}: #{messages.join(' - ')}"

UPDATE_IDLE = 0
UPDATE_UPDATING = 1
UPDATE_REQUIRED = 2


				remoteApps = _.indexBy(remoteApps, 'appId')
				remoteAppIds = _.keys(remoteApps)

				# @Praneeth: looks like this might be a good place to run the special functions,
				# like turning vpn on/off if remoteAppEnvs has the corresponding variable.
				_.map specialActionEnvVars, (specialActionCallback, key) ->
					_.map remoteAppIds, (appId) ->
						if remoteAppEnvs[appId][key]? && specialActionCallback?
							specialActionCallback(remoteAppEnvs[appId][key])

				apps = _.indexBy(apps, 'appId')
				localApps = _.mapValues apps, (app) ->
