@@ -6,7 +6,7 @@ import fs from 'fs';
6
6
import { URL } from 'url' ;
7
7
import { Inputs , CmdResult } from './interfaces' ;
8
8
import { createDir } from './utils' ;
9
- import { cp , rm } from 'shelljs' ;
9
+ import shell from 'shelljs' ;
10
10
11
11
export async function createBranchForce ( branch : string ) : Promise < void > {
12
12
await exec . exec ( 'git' , [ 'init' ] ) ;
@@ -34,7 +34,7 @@ export async function deleteExcludedAssets(destDir: string, excludeAssets: strin
34
34
for await ( const file of globber . globGenerator ( ) ) {
35
35
core . info ( `[INFO] delete ${ file } ` ) ;
36
36
}
37
- rm ( '-rf' , files ) ;
37
+ shell . rm ( '-rf' , files ) ;
38
38
return ;
39
39
}
40
40
@@ -53,11 +53,12 @@ export async function copyAssets(
53
53
const dotGitPath = path . join ( publishDir , '.git' ) ;
54
54
if ( fs . existsSync ( dotGitPath ) ) {
55
55
core . info ( `[INFO] delete ${ dotGitPath } ` ) ;
56
- rm ( '-rf' , dotGitPath ) ;
56
+ shell . rm ( '-rf' , dotGitPath ) ;
57
57
}
58
58
59
59
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 ) ;
61
62
62
63
await deleteExcludedAssets ( destDir , excludeAssets ) ;
63
64
0 commit comments