Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function openFolderAsync(dir: string) {
if (process.platform === 'darwin') {
return await osascript.openFinderToFolderAsync(dir);
} else if (process.platform === 'win32') {
return await spawnAsync('explorer', [dir]);
} else {
throw new XDLError('PLATFORM_NOT_SUPPORTED', 'openFolderAsync not supported');
}
}