File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -70,25 +70,25 @@ if (exitCode) {
7070 ? core . getBooleanInput ( "push-force" )
7171 : null ;
7272 if ( ! pushRefspec ) {
73- const { exitCode } = await $ ( {
73+ const { exitCode, stdout } = await $ ( {
7474 cwd : rootPath ,
7575 reject : false ,
7676 } ) `git symbolic-ref HEAD` ;
7777 if ( exitCode ) {
78- pushRefspec = stdout ;
79- } else {
8078 const { stdout } = await $ ( { cwd : rootPath } ) `git tag --points-at HEAD` ;
79+ console . assert ( stdout , "no stdout from listing tags" ) ;
8180 const tags = stdout . split ( / \r ? \n / g) ;
82- console . assert ( tags . length == = 1 , `tags=${ tags } longer than 1` ) ;
81+ console . assert ( tags . length > = 1 , `tags=${ tags } longer than 1` ) ;
8382 pushRefspec = tags [ 0 ] ;
83+ } else {
84+ pushRefspec = stdout ;
8485 }
8586 }
8687 if ( pushForce == null ) {
8788 const { exitCode } = await $ ( {
8889 cwd : rootPath ,
8990 reject : false ,
9091 } ) `git symbolic-ref HEAD` ;
91- console . log ( pushForce , "git symbolic-ref HEAD" , exitCode ) ;
9292 if ( exitCode ) {
9393 pushForce = true ;
9494 } else {
You can’t perform that action at this time.
0 commit comments