Skip to content

Commit e3fcbe6

Browse files
committed
Fix argv tests
1 parent 06bc987 commit e3fcbe6

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/vs/code/node/argv.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import * as os from 'os';
77
import * as minimist from 'minimist';
8-
import pkg from 'vs/platform/package';
98
import { localize } from 'vs/nls';
109

1110
export interface ParsedArgs extends minimist.ParsedArgs {
@@ -129,9 +128,9 @@ function wrapText(text: string, columns: number) : string[] {
129128
return lines;
130129
}
131130

132-
export function buildHelpMessage(): string {
131+
export function buildHelpMessage(version: string): string {
133132
let columns = (<any>process.stdout).isTTY ? (<any>process.stdout).columns : 80;
134-
return `Visual Studio Code v${ pkg.version }
133+
return `Visual Studio Code v${ version }
135134
136135
137136
Usage: ${ executable } [arguments] [paths...]

src/vs/code/node/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function main(args: string[]): TPromise<void> {
2121
const argv = parseArgs(args);
2222

2323
if (argv.help) {
24-
console.log(buildHelpMessage());
24+
console.log(buildHelpMessage(pkg.version));
2525
} else if (argv.version) {
2626
console.log(pkg.version);
2727
} else if (shouldSpawnCliProcess(argv)) {

src/vs/code/test/node/argv.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ suite('formatOptions', () => {
2626
formatOptions({
2727
'foo': (<any>'bar ').repeat(9)
2828
}, 40),
29-
' foo bar bar bar bar bar bar bar bar\n' +
30-
' bar');
29+
' foo bar bar bar bar bar bar bar bar\n' +
30+
' bar');
3131
});
3232

3333
test('Text should revert to the condensed view when the terminal is too narrow', () => {
3434
assert.equal(
3535
formatOptions({
3636
'foo': (<any>'bar ').repeat(9)
3737
}, 30),
38-
' foo\n' +
39-
' bar bar bar bar bar bar bar bar bar ');
38+
' foo\n' +
39+
' bar bar bar bar bar bar bar bar bar ');
4040
});
4141
});

0 commit comments

Comments
 (0)