Skip to content

dkg init: hardcoded ~/.dkg/auth.token log path is misleading in monorepo dev mode #317

@Jurij89

Description

@Jurij89

Summary

dkg init summary output hardcodes the auth-token path as ~/.dkg/auth.token even when the actual write goes to ~/.dkg-dev/auth.token (monorepo dev-mode resolved by dkgDir() in packages/cli/src/config.ts:444-451). The token is written to the right place, only the log lies.

Reproduction

cd dkg-v9
pnpm dkg init
#
# Config saved to /home/<user>/.dkg-dev/config.json
#   auth:       enabled (token in ~/.dkg/auth.token)   ← wrong path

Token actually lands at ~/.dkg-dev/auth.token.

Root cause

packages/cli/src/cli.ts:381:

console.log(`  auth:       ${enableAuth ? 'enabled (token in ~/.dkg/auth.token)' : 'disabled'}`);

The path is a string literal. The actual write at cli.ts:454 correctly uses join(dkgDir(), 'auth.token').

Fix

Reuse dkgDir() for the log too. One-line change:

console.log(`  auth:       ${enableAuth ? `enabled (token in ${join(dkgDir(), 'auth.token')})` : 'disabled'}`);

Affected

  • packages/cli/src/cli.ts:381

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions