()
| 151 | } |
| 152 | |
| 153 | function getPortableDataPath(): string { |
| 154 | if (process.env['VSCODE_PORTABLE']) { |
| 155 | return process.env['VSCODE_PORTABLE']; |
| 156 | } |
| 157 | |
| 158 | if (process.platform === 'win32' || process.platform === 'linux') { |
| 159 | return path.join(getApplicationPath(), 'data'); |
| 160 | } |
| 161 | |
| 162 | const portableDataName = product.portable || `${product.applicationName}-portable-data`; |
| 163 | return path.join(path.dirname(getApplicationPath()), portableDataName); |
| 164 | } |
| 165 | |
| 166 | const portableDataPath = getPortableDataPath(); |
| 167 | const isPortable = !('target' in product) && fs.existsSync(portableDataPath); |
no test coverage detected
searching dependent graphs…