Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

config: with PALEE_CONFIG_DIR unset the CLI silently uses the machine-global config and never prints which vault it acts on

Closed
#311 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #421 by @Kuldeep2822k — merged

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript
Domain
cli

Research direction

Start with the config path resolution in src/cli/config.ts (lines 28-37), which checks PALEE_CONFIG_DIR, then %LOCALAPPDATA%\palee, then ~/.config/palee. Then check the help text in bin/palee.ts, which doesn't mention the variable, and the output of adopt, roadmap and review. Done when verbose and --json output show the resolved vault and config path, and palee --help and config --help document PALEE_CONFIG_DIR. The refuse-write option needs a maintainer decision first.

Written by the indexing model from the issue text.

Description

bug core priority: high tests

Summary

PALEE_CONFIG_DIR is the only config override and appears in no help text. When it is unset, every command silently reads and writes the machine-global config, so a scripted run can act on a completely different vault than intended — and mutating commands never echo the vault they touched.

Repro

Two parallel automation runs, each meant to have its own vault. One block omitted the export:

env -u PALEE_CONFIG_DIR palee-test config show
  Vault Path: D:\palee-students\turing\vault     <-- another run's vault

The unscoped block then wrote 16 adopted notes into that other run's directory tree, at exit 0, while printing nothing that identified the target vault.

Impact

A data-integrity hazard for any CI job, script, or concurrent use — and completely invisible. Nothing in adopt / roadmap / review output names the resolved config file or vault.

Expected

  1. Print the resolved vault (and config path) on every mutating command, at minimum in verbose and --json output.
  2. Document PALEE_CONFIG_DIR in palee --help and config --help.
  3. Consider refusing a write when the target vault was not set by this invocation's own config.

Where

src/cli/config.ts:28-37 — PALEE_CONFIG_DIR override, else %LOCALAPPDATA%\palee on Windows, else ~/.config/palee. No help text anywhere in bin/palee.ts mentions the variable.

Environment
  • palee 0.6.0, local build from main at 02dacd0 (installed as palee-test; reproduce with palee)
  • Node v24.19.0, Windows 11 x64, Git Bash
  • Every command was run for real; exit codes captured by command substitution (never $? after a pipe)
Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
15h 54m
Merged PRs (30d)
163

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Kuldeep2822k/cli

All issues in Kuldeep2822k/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.