Skip to content

Commit

Permalink
fix: load configuration by absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Aug 15, 2024
1 parent ebf12e1 commit 101ba0b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import chalk from 'chalk';
import { Command } from 'commander';
import select, { Separator } from '@inquirer/select';
import os from 'os';
import path from 'path';
import { z } from 'zod';

Expand All @@ -26,9 +27,10 @@ import {

dotenv.config({
path: [
`${path.resolve(process.cwd(), '.config', 'storypointer', '.env')}`,
`${path.resolve(process.cwd(), '.env.storypointer')}`,
`${path.resolve(process.cwd(), '.env')}`,
`${path.resolve(os.homedir(), '.config', 'storypointer', '.env')}`,
`${path.resolve(os.homedir(), '.env.storypointer')}`,
`${path.resolve(os.homedir(), '.env')}`,
],
});

Expand Down

0 comments on commit 101ba0b

Please sign in to comment.