How to use the @expo/osascript.openFolderInTerminalAppAsync function in @expo/osascript

To help you get started, we’ve selected a few @expo/osascript 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 / expo-cli / packages / xdl / src / FileSystem.ts View on Github external
export async function openConsoleAsync(dir: string) {
  if (process.platform === 'darwin') {
    await osascript.openFolderInTerminalAppAsync(dir);
  } else if (process.platform === 'win32') {
    execSync(`start cmd /K "cd /d ${dir}"`);
  } else {
    throw new XDLError('PLATFORM_NOT_SUPPORTED', 'openConsoleAsync not supported');
  }
}

@expo/osascript

Tools for running an osascripts in Node

MIT
Latest version published 5 months ago

Package Health Score

91 / 100
Full package analysis