@@ -57,8 +57,8 @@ export async function main(argv: string[]): TPromise<any> {
5757 return mainCli . then ( cli => cli . main ( args ) ) ;
5858 }
5959
60- // Write Elevated
61- else if ( args [ 'sudo -write' ] ) {
60+ // Write File
61+ else if ( args [ 'file -write' ] ) {
6262 const source = args . _ [ 0 ] ;
6363 const target = args . _ [ 1 ] ;
6464
@@ -69,15 +69,15 @@ export async function main(argv: string[]): TPromise<any> {
6969 ! fs . existsSync ( source ) || ! fs . statSync ( source ) . isFile ( ) || // make sure source exists as file
7070 ! fs . existsSync ( target ) || ! fs . statSync ( target ) . isFile ( ) // make sure target exists as file
7171 ) {
72- return TPromise . wrapError ( new Error ( 'Using --sudo -write with invalid arguments.' ) ) ;
72+ return TPromise . wrapError ( new Error ( 'Using --file -write with invalid arguments.' ) ) ;
7373 }
7474
7575 try {
7676
7777 // Check for readonly status and chmod if so if we are told so
7878 let targetMode : number ;
7979 let restoreMode = false ;
80- if ( ! ! args [ 'sudo -chmod' ] ) {
80+ if ( ! ! args [ 'file -chmod' ] ) {
8181 targetMode = fs . statSync ( target ) . mode ;
8282 if ( ! ( targetMode & 128 ) /* readonly */ ) {
8383 fs . chmodSync ( target , targetMode | 128 ) ;
@@ -106,7 +106,7 @@ export async function main(argv: string[]): TPromise<any> {
106106 fs . chmodSync ( target , targetMode ) ;
107107 }
108108 } catch ( error ) {
109- return TPromise . wrapError ( new Error ( `Using --sudo -write resulted in an error: ${ error } ` ) ) ;
109+ return TPromise . wrapError ( new Error ( `Using --file -write resulted in an error: ${ error } ` ) ) ;
110110 }
111111
112112 return TPromise . as ( null ) ;
0 commit comments