File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const progress = require("progress");
2020const prompt = require ( "prompt" ) ;
2121import * as Q from "q" ;
2222
23- const rimraf = require ( "rimraf" ) ;
23+ const { rimraf } = require ( "rimraf" ) ;
2424import * as semver from "semver" ;
2525
2626const Table = require ( "cli-table" ) ;
@@ -277,15 +277,7 @@ function deleteConnectionInfoCache(printMessage: boolean = true): void {
277277}
278278
279279function deleteFolder ( folderPath : string ) : Promise < void > {
280- return Promise < void > ( ( resolve , reject , notify ) => {
281- rimraf ( folderPath , ( err : any ) => {
282- if ( err ) {
283- reject ( err ) ;
284- } else {
285- resolve ( < void > null ) ;
286- }
287- } ) ;
288- } ) ;
280+ return rimraf ( folderPath ) . then ( ( ) => undefined ) ;
289281}
290282
291283function deploymentAdd ( command : cli . IDeploymentAddCommand ) : Promise < void > {
Original file line number Diff line number Diff line change 11import * as fs from "fs" ;
22import * as path from "path" ;
3- import * as rimraf from "rimraf" ;
3+ import { rimrafSync } from "rimraf" ;
44import * as temp from "temp" ;
55
66export function isBinaryOrZip ( path : string ) : boolean {
@@ -22,7 +22,7 @@ export function fileExists(file: string): boolean {
2222export function copyFileToTmpDir ( filePath : string ) : string {
2323 if ( ! isDirectory ( filePath ) ) {
2424 const outputFolderPath : string = temp . mkdirSync ( "code-push" ) ;
25- rimraf . sync ( outputFolderPath ) ;
25+ rimrafSync ( outputFolderPath ) ;
2626 fs . mkdirSync ( outputFolderPath ) ;
2727
2828 const outputFilePath : string = path . join ( outputFolderPath , path . basename ( filePath ) ) ;
You can’t perform that action at this time.
0 commit comments