Skip to content

Commit

Permalink
build: do not overwrite repoExists variable in version extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Oct 14, 2023
1 parent 145d735 commit c41afd1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/node_modules/@stdlib/_tools/scripts/publish_packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,13 +662,11 @@ function publish( pkg, clbk ) {
debug( 'Executing command to retrieve last version: %s', command );
try {
command = shell( command ).toString();
repoExists = true;
version = substringAfterLast( command, '/' );
version = replace( version, /[-a-z.]*\^{}/, '' );
version = trim( removeFirst( version ) ); // Remove leading `v`...
} catch ( error ) {
console.error( 'Encountered an error when attempting to retrieve the last version. Error: %s', error.message );
repoExists = false;
}
if ( !version ) {
version = '0.0.0';
Expand Down

0 comments on commit c41afd1

Please sign in to comment.