File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Command } from 'commander' ;
22import chalk from 'chalk' ;
33import { existsSync } from 'fs' ;
4- import { join } from 'path' ;
4+ import { join , dirname } from 'path' ;
55import { createDatabaseManagerFromConfigPath , EnvHistoryRecord } from '@/utils/db' ;
66
77interface HistoryOptions {
@@ -30,7 +30,7 @@ export function historyCommand(program: Command): void {
3030 . action ( async ( tag : string | undefined , options : HistoryOptions ) => {
3131 try {
3232 const configPath = join ( process . cwd ( ) , options . config || './envx.config.yaml' ) ;
33- const configDir = join ( process . cwd ( ) , options . config || './envx.config.yaml' , '..' ) ;
33+ const configDir = dirname ( configPath ) ;
3434
3535 console . log ( chalk . blue ( '📚 Viewing environment variable history...' ) ) ;
3636 console . log ( chalk . gray ( `📁 Config file: ${ options . config } ` ) ) ;
You can’t perform that action at this time.
0 commit comments