From 827f477baa8a96392b98591b125b0c367390abc4 Mon Sep 17 00:00:00 2001 From: Adam Lynch Date: Mon, 8 Dec 2014 15:46:55 +0000 Subject: [PATCH] Optional using graceful-fs if it's available --- lib/ncp.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ncp.js b/lib/ncp.js index b5c4f93..5371f20 100644 --- a/lib/ncp.js +++ b/lib/ncp.js @@ -1,5 +1,11 @@ -var fs = require('fs'), +var fs, path = require('path'); + +try { + fs = require("graceful-fs"); +} catch (er) { + fs = require("fs"); +} const modern = /^v0\.1\d\.\d+/.test(process.version);