зеркало из https://github.com/docker/kitematic.git
Fixes #1403: PATH is wrong on Windows.
Signed-off-by: Attila Kelemen <attila.kelemen85@gmail.com>
This commit is contained in:
Родитель
dd569065d8
Коммит
16bdc16dd3
|
@ -8,13 +8,17 @@ import os from 'os';
|
|||
import path from 'path';
|
||||
import child_process from 'child_process';
|
||||
|
||||
var isWin = process.platform === 'win32';
|
||||
|
||||
process.env.NODE_PATH = path.join(__dirname, 'node_modules');
|
||||
process.env.RESOURCES_PATH = path.join(__dirname, '/../resources');
|
||||
process.env.PATH = '/usr/local/bin:' + process.env.PATH;
|
||||
if (!isWin) {
|
||||
process.env.PATH = '/usr/local/bin:' + process.env.PATH;
|
||||
}
|
||||
|
||||
var size = {}, settingsjson = {};
|
||||
try {
|
||||
size = JSON.parse(fs.readFileSync(path.join(process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'], 'Library', 'Application\ Support', 'Kitematic', 'size')));
|
||||
size = JSON.parse(fs.readFileSync(path.join(process.env[isWin ? 'USERPROFILE' : 'HOME'], 'Library', 'Application\ Support', 'Kitematic', 'size')));
|
||||
} catch (err) {}
|
||||
try {
|
||||
settingsjson = JSON.parse(fs.readFileSync(path.join(__dirname, 'settings.json'), 'utf8'));
|
||||
|
|
Загрузка…
Ссылка в новой задаче