From 49197071cdab06d5c9198cd2295be70f09556c4c Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Thu, 15 Mar 2018 22:01:27 -0400 Subject: [PATCH] test(integration): clone master branch if integration tests run on detached HEAD --- src/cli/tests/cli.integration.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cli/tests/cli.integration.spec.ts b/src/cli/tests/cli.integration.spec.ts index a8996b8..af3d0d0 100644 --- a/src/cli/tests/cli.integration.spec.ts +++ b/src/cli/tests/cli.integration.spec.ts @@ -39,7 +39,10 @@ const branch = execa.sync('git', [ '--abbrev-ref', 'HEAD' ]).stdout; -const repoInfo = { repo: process.cwd(), branch }; +const repoInfo = { + branch: branch === 'HEAD' ? 'master' : branch, + repo: process.cwd() +}; const buildDir = join(process.cwd(), 'build'); const env = { TYPESCRIPT_STARTER_REPO_BRANCH: repoInfo.branch,