Skip to content

Commit

Permalink
Merge pull request #53 from Samsung/profilepath
Browse files Browse the repository at this point in the history
Modify profile default path
  • Loading branch information
pwsses authored Aug 3, 2020
2 parents dc53964 + 99c2e64 commit ab2d31e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 21 additions & 2 deletions lib/userInfoHelper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const inquirer = require('inquirer');
const fs = require('fs');
const os = require('os');
const path = require('path');
const _ = require('lodash');

Expand Down Expand Up @@ -175,7 +176,6 @@ module.exports = {
};

function initWitsconfigInfo() {
const DEFAULT_PROFILE_PATH = 'C:/tizen-studio-data/profile/profiles.xml';
return {
connectionInfo: {
deviceIp: null,
Expand All @@ -184,11 +184,30 @@ function initWitsconfigInfo() {
isDebugMode: false
},
profileInfo: {
path: DEFAULT_PROFILE_PATH
path: getProfilePath()
}
};
}

function getProfilePath() {
let profilePath = '';
switch (util.PLATFORM) {
case 'win32':
profilePath = 'C:/tizen-studio-data/profile/profiles.xml';
break;
case 'linux':
default:
profilePath = path.resolve(
os.homedir(),
'tizen-studio-data',
'profile',
'profiles.xml'
);
break;
}
return profilePath;
}

function displayStoredInfo(data) {
console.log(``);
console.log(` > [ Stored Information ]`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tizentv/wits",
"version": "2.1.9",
"version": "2.1.10",
"description": "Instant live reload tool for Tizen Web Application development",
"main": "index.js",
"author": "Samsung Electronics Co., Ltd.",
Expand Down

0 comments on commit ab2d31e

Please sign in to comment.