Skip to content

Commit 79fe01e

Browse files
committed
Revert "set portable mode"
This reverts commit b295b72.
1 parent 4323080 commit 79fe01e

2 files changed

Lines changed: 2 additions & 28 deletions

File tree

src/vs/code/node/cli.ts

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
88
import { assign } from 'vs/base/common/objects';
99
import { parseCLIProcessArgv, buildHelpMessage } from 'vs/platform/environment/node/argv';
1010
import { ParsedArgs } from 'vs/platform/environment/common/environment';
11-
import product, { IProductConfiguration } from 'vs/platform/node/product';
11+
import product from 'vs/platform/node/product';
1212
import pkg from 'vs/platform/node/package';
1313
import * as paths from 'path';
1414
import * as os from 'os';
@@ -19,7 +19,6 @@ import { resolveTerminalEncoding } from 'vs/base/node/encoding';
1919
import * as iconv from 'iconv-lite';
2020
import { writeFileAndFlushSync } from 'vs/base/node/extfs';
2121
import { isWindows } from 'vs/base/common/platform';
22-
import uri from 'vs/base/common/uri';
2322

2423
function shouldSpawnCliProcess(argv: ParsedArgs): boolean {
2524
return !!argv['install-source']
@@ -32,15 +31,6 @@ interface IMainCli {
3231
main: (argv: ParsedArgs) => TPromise<void>;
3332
}
3433

35-
function updateProductJsonSync(fn: (productJson: IProductConfiguration) => void): void {
36-
const rootPath = paths.dirname(uri.parse(require.toUrl('')).fsPath);
37-
const productJsonPath = paths.join(rootPath, 'product.json');
38-
const product = JSON.parse(fs.readFileSync(productJsonPath, 'utf8')) as IProductConfiguration;
39-
fn(product);
40-
41-
fs.writeFileSync(productJsonPath, JSON.stringify(product, null, '\t'), 'utf8');
42-
}
43-
4434
export async function main(argv: string[]): TPromise<any> {
4535
let args: ParsedArgs;
4636

@@ -67,18 +57,6 @@ export async function main(argv: string[]): TPromise<any> {
6757
return mainCli.then(cli => cli.main(args));
6858
}
6959

70-
// Enable Portable
71-
else if (args['set-portable']) {
72-
updateProductJsonSync(product => product.portable = 'code-portable-data');
73-
console.log('Portable mode enabled');
74-
}
75-
76-
// Disable Portable
77-
else if (args['unset-portable']) {
78-
updateProductJsonSync(product => { delete product.portable; delete product.portableTemp; });
79-
console.log('Portable mode disabled');
80-
}
81-
8260
// Write File
8361
else if (args['file-write']) {
8462
const source = args._[0];

src/vs/platform/environment/node/argv.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ const options: minimist.Opts = {
6464
'status',
6565
'file-write',
6666
'file-chmod',
67-
'driver-verbose',
68-
'set-portable',
69-
'unset-portable'
67+
'driver-verbose'
7068
],
7169
alias: {
7270
add: 'a',
@@ -152,8 +150,6 @@ const optionsHelp: { [name: string]: string; } = {
152150
'-w, --wait': localize('wait', "Wait for the files to be closed before returning."),
153151
'--locale <locale>': localize('locale', "The locale to use (e.g. en-US or zh-TW)."),
154152
'--user-data-dir <dir>': localize('userDataDir', "Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code."),
155-
'--set-portable': localize('setPortable', "Enables portable mode"),
156-
'--unset-portable': localize('unsedPortable', "Disables portable mode"),
157153
'-v, --version': localize('version', "Print version."),
158154
'-h, --help': localize('help', "Print usage.")
159155
};

0 commit comments

Comments
 (0)