@@ -7,13 +7,10 @@ import * as minimist from 'vscode-minimist';
77import * as os from 'os' ;
88import { localize } from 'vs/nls' ;
99import { ParsedArgs } from 'vs/platform/environment/common/environment' ;
10- import { join } from 'vs/base/common/path' ;
11- import { writeFileSync } from 'vs/base/node/pfs' ;
1210
1311/**
1412 * This code is also used by standalone cli's. Avoid adding any other dependencies.
1513 */
16-
1714const helpCategories = {
1815 o : localize ( 'optionsUpperCase' , "Options" ) ,
1916 e : localize ( 'extensionsManagement' , "Extensions Management" ) ,
@@ -161,7 +158,7 @@ export function parseArgs<T>(args: string[], options: OptionDescriptions<T>, err
161158 }
162159 }
163160 }
164- // remote aliases to avoid confusion
161+ // remove aliases to avoid confusion
165162 const parsedArgs = minimist ( args , { string, boolean, alias } ) ;
166163
167164 const cleanedArgs : any = { } ;
@@ -310,33 +307,3 @@ export function buildVersionMessage(version: string | undefined, commit: string
310307 return `${ version || localize ( 'unknownVersion' , "Unknown version" ) } \n${ commit || localize ( 'unknownCommit' , "Unknown commit" ) } \n${ process . arch } ` ;
311308}
312309
313- export function addArg ( argv : string [ ] , ...args : string [ ] ) : string [ ] {
314- const endOfArgsMarkerIndex = argv . indexOf ( '--' ) ;
315- if ( endOfArgsMarkerIndex === - 1 ) {
316- argv . push ( ...args ) ;
317- } else {
318- // if the we have an argument "--" (end of argument marker)
319- // we cannot add arguments at the end. rather, we add
320- // arguments before the "--" marker.
321- argv . splice ( endOfArgsMarkerIndex , 0 , ...args ) ;
322- }
323-
324- return argv ;
325- }
326-
327- export function createWaitMarkerFile ( verbose ?: boolean ) : string | undefined {
328- const randomWaitMarkerPath = join ( os . tmpdir ( ) , Math . random ( ) . toString ( 36 ) . replace ( / [ ^ a - z ] + / g, '' ) . substr ( 0 , 10 ) ) ;
329-
330- try {
331- writeFileSync ( randomWaitMarkerPath , '' ) ;
332- if ( verbose ) {
333- console . log ( `Marker file for --wait created: ${ randomWaitMarkerPath } ` ) ;
334- }
335- return randomWaitMarkerPath ;
336- } catch ( err ) {
337- if ( verbose ) {
338- console . error ( `Failed to create marker file for --wait: ${ err } ` ) ;
339- }
340- return undefined ;
341- }
342- }
0 commit comments