Skip to content

Commit 486155a

Browse files
authored
Merge pull request #111 from Chrilleweb/cmn/dev
small fix for runScanMode function
2 parents a414f1a + dfc658f commit 486155a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cli/run.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ export async function run(program: Command): Promise<void> {
5353
* @returns void
5454
*/
5555
async function runScanMode(opts: Options): Promise<void> {
56-
const envPath = opts.envFlag || (fs.existsSync('.env') ? '.env' : undefined);
56+
const envPath =
57+
typeof opts.envFlag === 'string'
58+
? opts.envFlag
59+
: fs.existsSync('.env')
60+
? '.env'
61+
: undefined;
5762

5863
const { exitWithError } = await scanUsage({
5964
cwd: opts.cwd,

0 commit comments

Comments
 (0)