1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Tools: Minor tweaks on desktop release script

This commit is contained in:
Laurent Cozic
2021-01-19 23:02:58 +00:00
parent 4e2e26f033
commit ddf3e16ff0
3 changed files with 75 additions and 33 deletions

View File

@@ -258,11 +258,11 @@ export async function gitRepoCleanTry() {
if (!(await gitRepoClean())) throw new Error(`There are pending changes in the repository: ${process.cwd()}`);
}
export async function gitPullTry() {
export async function gitPullTry(ignoreIfNotBranch = true) {
try {
await execCommand('git pull');
} catch (error) {
if (error.message.includes('no tracking information for the current branch')) {
if (ignoreIfNotBranch && error.message.includes('no tracking information for the current branch')) {
console.info('Skipping git pull because no tracking information on current branch');
} else {
throw error;