mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from master
This commit is contained in:
18
src/paths.js
18
src/paths.js
@@ -3,10 +3,18 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
var path = require('path');
|
||||
var os = require('os');
|
||||
var pkg = require('../package.json');
|
||||
//@ts-check
|
||||
'use strict';
|
||||
|
||||
// @ts-ignore
|
||||
const pkg = require('../package.json');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
/**
|
||||
* @param {string} platform
|
||||
* @returns {string}
|
||||
*/
|
||||
function getAppDataPath(platform) {
|
||||
switch (platform) {
|
||||
case 'win32': return process.env['VSCODE_APPDATA'] || process.env['APPDATA'] || path.join(process.env['USERPROFILE'], 'AppData', 'Roaming');
|
||||
@@ -16,6 +24,10 @@ function getAppDataPath(platform) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} platform
|
||||
* @returns {string}
|
||||
*/
|
||||
function getDefaultUserDataPath(platform) {
|
||||
// {{SQL CARBON EDIT}} hard-code Azure Data Studio
|
||||
return path.join(getAppDataPath(platform), 'azuredatastudio');
|
||||
|
||||
Reference in New Issue
Block a user