xref: /expo/packages/@expo/cli/src/api/settings.ts (revision e32ccf9f)
18d307f52SEvan Bacon// This file represents temporary globals for the CLI when using the API.
28d307f52SEvan Bacon// Settings should be as minimal as possible since they are globals.
3*e32ccf9fSEvan Baconimport chalk from 'chalk';
48d307f52SEvan Bacon
5*e32ccf9fSEvan Baconimport { Log } from '../log';
6*e32ccf9fSEvan Baconimport { env } from '../utils/env';
7*e32ccf9fSEvan Bacon
8*e32ccf9fSEvan Baconexport function disableNetwork() {
9*e32ccf9fSEvan Bacon  if (env.EXPO_OFFLINE) return;
10*e32ccf9fSEvan Bacon  process.env.EXPO_OFFLINE = '1';
11*e32ccf9fSEvan Bacon  Log.log(chalk.gray('Networking has been disabled'));
12*e32ccf9fSEvan Bacon}
13