[FEATURE] Add ability to ignore files if they don't exist

Aperta
#253 1 commento 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, node.js
Ambito
tooling

Direzione di ricerca

Inizia dal punto di ingresso tar.c ed esamina come viene gestita la tabella delle opzioni e come i file mancanti producono attualmente errori lstat. Definisci il completamento come un’opzione che salti le voci inesistenti, mantenendo gli errori normali per gli altri fallimenti, quindi verifica il comportamento con la suite di test esistente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Enhancement

What / Why

Would be nice if there was a way to specify in the tar options to ignore files if they don't exist.

In my code, I am specifying a list of files that I want to compress into an archive, but it's in a dynamic directory so sometimes the files get removed. This will spit out an error with lstat saying that it does not exist.

When

Simply have an argument in the options table for tar.c

How

Could probably do it and have it almost like a "less strict" mode. When the file is being retrieved for the archive, have a checker that is like if(!fs.existsSync(file)) { return } or something.

Current Behavior

Feeding in a list of files in an array, and having one of them not exist will pass an error.

Expected Behavior

Having an option to specify something like ignoreNotFound should have it just ignore any entries in the array that do not exist.

Lingua principale
JavaScript
Stelle
924
Fork
293
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di isaacs/node-tar

Tutte le issue di isaacs/node-tar

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.