Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/app.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ export async function run(args: Args) {
const { print } = usePrint()
const { arg0: execPath, env: { PATH, SHELL }, modifiers: { verbosity, json } } = useConfig()

if (args.cd) {
const chdir = args.cd
console.log({ chdir })
Deno.chdir(chdir.string)
}

if (args.sync) {
const logger = (({ new: make, logJSON }) => {
if (!json) {
Expand Down
7 changes: 7 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import help from "./app.help.ts"
try {
const [args, flags] = parseArgs(Deno.args, Deno.execPath())

// this effects useConfig and other args so needs to be done as soon as possible
if (args.cd) {
const chdir = args.cd
console.log({ chdir })
Deno.chdir(chdir.string)
}

const config = ConfigDefault(flags)

config.logger.prefix = (!Deno.isatty(Deno.stdout.rid) || Deno.env.get("CI")) ? "tea:" : undefined
Expand Down