-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: env issue importing remote video source
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
#!/usr/bin/env node | ||
import process from 'node:process'; | ||
import path from 'node:path'; | ||
import nextEnv from '@next/env'; | ||
import log from './logger.js'; | ||
|
||
nextEnv.loadEnvConfig(process.cwd(), undefined, log); | ||
|
||
import yargs from 'yargs/yargs'; | ||
|
||
import * as init from './cli/init.js'; | ||
import * as sync from './cli/sync.js'; | ||
|
||
nextEnv.loadEnvConfig(process.cwd(), undefined, log); | ||
|
||
yargs(process.argv.slice(2)).command(init).command(sync).demandCommand().help().argv; | ||
|
||
// Import the app's next.config.js file so the env variables | ||
// __NEXT_VIDEO_OPTS set in with-next-video can be used. | ||
import(path.resolve('next.config.js')) | ||
.catch(() => log.error('Failed to load next.config.js')); |