Skip to content

Commit 320507e

Browse files
committed
fix for the issue #3
1 parent 7603a9d commit 320507e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,14 @@ function getFileMeta(dirname, value, opts) {
133133
i++;
134134
}
135135

136-
if (!(fileMeta.src)) {
137-
throw new Error('Error in postcss-copy: "src" ' +
138-
`not found in ${pathName}`);
139-
}
140-
141136
return new Promise((resolve, reject) => {
142137
fs.readFile(pathName, (err, contents) => {
143138
if (err) {
144-
reject(`Can't read the file in ${pathName}`);
139+
reject(`Warning in postcss-copy:
140+
Can't read the file in ${pathName}`);
141+
} else if (!(fileMeta.src)) {
142+
reject(`Warning in postcss-copy:
143+
"src" not found in ${pathName}`);
145144
} else {
146145
fileMeta.contents = contents;
147146
fileMeta.hash = opts.hashFunction(fileMeta.contents);

0 commit comments

Comments
 (0)