How to use the xdl.Binaries.writePathToUserSettingsAsync function in xdl

To help you get started, we’ve selected a few xdl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / exp / src / exp.js View on Github external
async function writePathAsync() {
  let subCommand = process.argv[2];
  if (subCommand === 'prepare-detached-build') {
    // This is being run from Android Studio or Xcode. Don't want to write PATH in this case.
    return;
  }

  await Binaries.writePathToUserSettingsAsync();
}
github expo / exp / src / exp.js View on Github external
async function writePathAsync() {
  let subCommand = process.argv[2];
  if (subCommand === 'prepare-detached-build') {
    // This is being run from Android Studio or Xcode. Don't want to write PATH in this case.
    return;
  }

  await Binaries.writePathToUserSettingsAsync();
}
github expo / xde / src / ui / MainScreen.js View on Github external
if (process.platform === 'darwin' && this.props.commandLineArgs) {
      let dummyIndex = _.indexOf(this.props.commandLineArgs, 'dummy');
      if (dummyIndex === -1) {
        return;
      }

      let argv = require('minimist')(this.props.commandLineArgs.slice(dummyIndex + 1));

      let pathEnvironment = argv['path-environment'];
      if (pathEnvironment) {
        process.env.PATH = pathEnvironment;
      }

      // Now that we have the correct PATH, write it to UserSettings so that
      // it'll work in the future if not started from command line
      await Binaries.writePathToUserSettingsAsync();

      let executedFrom = argv['executed-from'];
      if (!executedFrom) {
        return;
      }

      if (
        argv._ &&
        argv._.length > 0 &&
        (await this._tryStartProjectAsync(path.resolve(executedFrom, argv._[0])))
      ) {
        return;
      }

      // TODO: only start if exp.json exists
      await this._tryStartProjectAsync(executedFrom);