🎥 Make videos programmatically with React
`@remotion/cli`: Fix detecting repo from Vercel env variables
Jonny Burger303c873f8a1e
diff --git a/packages/cli/src/get-github-repository.ts b/packages/cli/src/get-github-repository.tsindex 1daf0f005a..540de9f1d3 100644--- a/packages/cli/src/get-github-repository.ts+++ b/packages/cli/src/get-github-repository.ts@@ -129,8 +129,9 @@ const getFromEnvVariables = (): GitSource | null => {return null;};-export const getGitSource = (remotionRoot: string | null): GitSource | null => {- if (remotionRoot === null) {+export const getGitSource = (remotionRoot: string): GitSource | null => {+ const fromEnv = getFromEnvVariables();+ if (fromEnv) {return getFromEnvVariables();}diff --git a/packages/cli/src/test/get-github-repo.test.ts b/packages/cli/src/test/get-github-repo.test.tsindex 66f5ca9294..aad331271d 100644--- a/packages/cli/src/test/get-github-repo.test.ts+++ b/packages/cli/src/test/get-github-repo.test.ts@@ -64,7 +64,7 @@ test('Should recognize VERCEL', () => {process.env.VERCEL_GIT_REPO_SLUG = 'remotion';process.env.VERCEL_GIT_REPO_OWNER = 'remotion-dev';- const source = getGitSource(null);+ const source = getGitSource('dontmatter');expect(source).not.toBeNull();expect(source?.name).toBe('remotion');expect(source?.org).toBe('remotion-dev');