commitizen / commitizen/cz-cli

NPM warning breaks `cz` prompts when using `scripts` entry

Offen
#964 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
17.5k
Forks
566
Ø Merge
8 Std. 16 Min.
Gemergte PRs (30 T.)
1

Beschreibung

When running commands from `scripts`, any NPM warnings seem to break `cz` prompts.

For example, running `npm run commit` (which runs `git-cz`) triggers some NPM warnings in my environment that then break the `cz` prompts. The same warnings are triggered by `npx cz` but the prompt continues to work normally. Using `yarn` to run the `script` (`yarn run commit`) also works normally.

The given error is caused by the Flatpak `vscodium` environment. The error is:

```bash
npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
npm WARN config location in the cache, and they are managed by
npm WARN config [`cacache`](http://npm.im/cacache).
```

I can't remove the entry `tmp` in `/app/etc/npmrc` given that file is read-only in the `vscodium` Flatpak.

For now it's easy to use `npx git-cz` or `yarn run git-cz`. This may not even be a direct issue with `git-cz` but instead `npm`, `node`, or my shell environment. But I thought I'd share in case anyone else comes across this annoyance.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, `npm run commit` und `npx cz` in der gemeldeten Flatpak-Umgebung zu reproduzieren, und vergleiche das Verhalten der `git-cz`-Eingabeaufforderung, wenn die npm-Warnung ausgegeben wird. Verfolge den `scripts`-Eintrag und ermittle, ob der Fix in cz-cli, npm, Node oder der Shell-Umgebung liegt; abgeschlossen bedeutet, dass die Eingabeaufforderung trotz vorhandener Warnung nutzbar bleibt oder das Problem eindeutig als extern identifiziert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, node.js
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.