process fails when one of the calls contains undefined for the data option #2

Aperto
aperto 2022-01-01 19:20:29 +00:00 da Ghost · 0 commenti

Seems to be called successfully many times but once it is given undefined for the data option in stageAsync which causes a rejection and failure.

Adding the following block to writeFileAsync allows the process to finish.

       if( !data ) {
         console.trace({
           filename,
           data,
           options,
         });
         data = `contents of '${ filename }' were not provided to safe-replace.\r\noption: '${ JSON.stringify( options ) }'`
        }

Seems to be called successfully many times but once it is given undefined for the data option in stageAsync which causes a rejection and failure. Adding the following block to `writeFileAsync` allows the process to finish. ```js if( !data ) { console.trace({ filename, data, options, }); data = `contents of '${ filename }' were not provided to safe-replace.\r\noption: '${ JSON.stringify( options ) }'` } ```
Effettua l'accesso per partecipare alla conversazione.
Nessuna etichetta
1 Partecipanti
Notifiche
Data di scadenza
Nessuna data di scadenza impostata.
Dipendenze

Nessuna dipendenza impostata.

Riferimento: coolaj86/fs-safe-replace.js#2
No description provided.