| 617 | } |
| 618 | |
| 619 | function getCodeCachePath(): string | undefined { |
| 620 | |
| 621 | // explicitly disabled via CLI args |
| 622 | if (process.argv.indexOf('--no-cached-data') > 0) { |
| 623 | return undefined; |
| 624 | } |
| 625 | |
| 626 | // running out of sources |
| 627 | if (process.env['VSCODE_DEV']) { |
| 628 | return undefined; |
| 629 | } |
| 630 | |
| 631 | // require commit id |
| 632 | const commit = product.commit; |
| 633 | if (!commit) { |
| 634 | return undefined; |
| 635 | } |
| 636 | |
| 637 | return path.join(userDataPath, 'CachedData', commit); |
| 638 | } |
| 639 | |
| 640 | async function mkdirpIgnoreError(dir: string | undefined): Promise<string | undefined> { |
| 641 | if (typeof dir === 'string') { |