Skip to content

Commit b537b20

Browse files
fix: use runtime cwd for data-dir flag
1 parent aa0636b commit b537b20

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/commands/launch/functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default class Functions extends Command {
2222
}),
2323
'data-dir': Flags.string({
2424
char: 'd',
25-
default: process.cwd(),
2625
description: 'Current working directory',
2726
}),
2827
};
@@ -34,7 +33,8 @@ export default class Functions extends Command {
3433

3534
async init(): Promise<void> {
3635
const { flags } = await this.parse(Functions);
37-
const projectBasePath = flags['data-dir'];
36+
const currentWorkingDirectory = process.cwd();
37+
const projectBasePath = flags['data-dir'] || currentWorkingDirectory;
3838

3939
const logger = new Logger({ projectBasePath });
4040
this.log = logger.log.bind(logger);

0 commit comments

Comments
 (0)