@@ -6,7 +6,7 @@ import fs from 'fs';
66import { URL } from 'url' ;
77import { Inputs , CmdResult } from './interfaces' ;
88import { createDir } from './utils' ;
9- import { cp , rm } from 'shelljs' ;
9+ import shell from 'shelljs' ;
1010
1111export async function createBranchForce ( branch : string ) : Promise < void > {
1212 await exec . exec ( 'git' , [ 'init' ] ) ;
@@ -34,7 +34,7 @@ export async function deleteExcludedAssets(destDir: string, excludeAssets: strin
3434 for await ( const file of globber . globGenerator ( ) ) {
3535 core . info ( `[INFO] delete ${ file } ` ) ;
3636 }
37- rm ( '-rf' , files ) ;
37+ shell . rm ( '-rf' , files ) ;
3838 return ;
3939}
4040
@@ -53,11 +53,12 @@ export async function copyAssets(
5353 const dotGitPath = path . join ( publishDir , '.git' ) ;
5454 if ( fs . existsSync ( dotGitPath ) ) {
5555 core . info ( `[INFO] delete ${ dotGitPath } ` ) ;
56- rm ( '-rf' , dotGitPath ) ;
56+ shell . rm ( '-rf' , dotGitPath ) ;
5757 }
5858
5959 core . info ( `[INFO] copy ${ publishDir } to ${ destDir } ` ) ;
60- cp ( '-RfL' , [ `${ publishDir } /*` , `${ publishDir } /.*` ] , destDir ) ;
60+ shell . config . globOptions = { dot : true } ;
61+ shell . cp ( '-RfL' , [ `${ publishDir } /*` ] , destDir ) ;
6162
6263 await deleteExcludedAssets ( destDir , excludeAssets ) ;
6364
0 commit comments