Use self nf path to run sub commands
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 54/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- node.js, typescript
- Ambito
- cli, developer-experience
Direzione di ricerca
Start by checking the CLI entry point and existing command dispatch for how nf subcommands are invoked. The request proposes using the local nf executable through npm exec for development; confirm which development command should change and verify it runs the requested build --watch subcommand.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Which package is this feature request for?
@nanoforge-dev/cli
Which command is this feature request for?
dev
Feature
nf dev starts build --watch and start --watch through the package manager: <pm> exec nf <command> --watch (dev.action.ts#L40-L42, package-manager.ts#L131-L141). So the package manager decides which nf runs, not the CLI that is running (process.argv[1]). As confirmed in the comments, the sub-commands can end up running the global nf binary instead of the project's local one.
Related: the local CLI is looked up from process.cwd(), not from --directory (local-binaries.ts#L6), so nf dev --directory <dir> run from another folder doesn't find the project's local CLI either.
Ideal solution or implementation
The sub-commands spawn process.execPath with the entry of the CLI that is running (process.argv[1]), followed by the sub-command and its flags, in directory, instead of <pm> exec nf.
Acceptance criteria:
- With a local CLI in the project and a different global
nf,nf devnever runs the global one forbuildorstart. - A test checks the command
nf devspawns (it uses the running CLI's entry, not<pm> exec nf). -
--editorand the other flags still reach thebuildsub-command.
Alternative solutions or implementations
Keep <pm> exec, but pass the local binary's path (<pm> exec <project>/node_modules/.bin/nf -- build --watch, as in the original request).
Other context
Open questions (not recorded, ask the team):
- Should the local CLI lookup use
--directoryinstead ofprocess.cwd()in the same change, or in its own issue?
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 2
- Merge medio
- 2g 18h
- PR unite (30g)
- 17
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NanoForge-dev/CLI
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NanoForge-dev/CLI#294 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NanoForge-dev/CLI#293 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NanoForge-dev/CLI#292 ·
I maintainer di solito rispondono entro 1 giorno
-
command:dev enhancement good first issue refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NanoForge-dev/CLI#281 ·
I maintainer di solito rispondono entro 1 giorno
-
bug command:build good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NanoForge-dev/CLI#276 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NanoForge-dev/CLI
Issue simili
-
Mend: dependency security vulnerability
Difficoltà 1/5 1-3 ore Idoneità per principianti 65/100
fdm-monster/fdm-monster#5563 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
growilabs/growi#12246 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SSWConsulting/SSW.Rules#2809 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno