mirror of
https://github.com/ZTatman/myst.git
synced 2026-11-21 12:27:59 +00:00
fix(cli): simplify path derivation for --output flag
- Remove unused outDir variable - Directly use opts.output or default to cwd/.env
This commit is contained in:
parent
134d5ff8c7
commit
9647f27db4
1 changed files with 1 additions and 2 deletions
|
|
@ -77,8 +77,7 @@ async function init(opts: { output?: string }) {
|
|||
c.yellow("Before you start:"),
|
||||
);
|
||||
|
||||
const outDir = opts.output ? path.dirname(opts.output) : process.cwd();
|
||||
const envPath = opts.output || path.join(outDir, ".env");
|
||||
const envPath = opts.output || path.join(process.cwd(), ".env");
|
||||
|
||||
// Check if .env file already exists
|
||||
let envExists = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue