From 88dd8bb92e6c851baad52e8b27d84360bc9010f9 Mon Sep 17 00:00:00 2001 From: YR Chen Date: Tue, 26 Sep 2023 08:57:34 +0800 Subject: [PATCH] fix: specify initial branch name to suppress Git hint --- src/swiftorg.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/swiftorg.ts b/src/swiftorg.ts index b2636ce..256e238 100644 --- a/src/swiftorg.ts +++ b/src/swiftorg.ts @@ -51,7 +51,7 @@ export class Swiftorg { gitArgs.push('--recursive', '--remote') } core.debug(`Initializing submodules in "${MODULE_DIR}"`) - await exec('git', ['init'], {cwd: MODULE_DIR}) + await exec('git', ['init', '-b', 'main'], {cwd: MODULE_DIR}) core.debug(`Updating submodules in "${MODULE_DIR}" with args "${gitArgs}"`) await exec('git', gitArgs, {cwd: MODULE_DIR}) const swiftorg = path.join(MODULE_DIR, 'swiftorg')