firebase / firebase/quickstart-nodejs

config/index.js does not exit after executing

Offen
#183 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
933
Forks
425
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When I run "node config/index.js get", it was actually executed successfully, but it does not exit.
Shall we need to add "finally" block like the following?
```node.js
function getTemplate() {
const config = admin.remoteConfig();
config.getTemplate()
.then(template => {
console.log('ETag from server: ' + template.etag);
const templateStr = JSON.stringify(template, null, 2);
fs.writeFileSync('config.json', templateStr);
})
.catch(err => {
console.error('Unable to get template');
console.error(err);
}).finally(() => {
process.exit();
});
}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with config/index.js and reproduce the issue using `node config/index.js get`. Trace the getTemplate flow and confirm that the command terminates after both successful and failed execution; done means the command exits instead of remaining open.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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