Commit 91d96379 authored by LianaHus's avatar LianaHus

fixed publish to gist for empty file

parent 416d7906
...@@ -429,7 +429,7 @@ fileExplorer.prototype.packageFiles = function (filesProvider, callback) { ...@@ -429,7 +429,7 @@ fileExplorer.prototype.packageFiles = function (filesProvider, callback) {
else { else {
async.eachSeries(Object.keys(files), (path, cb) => { async.eachSeries(Object.keys(files), (path, cb) => {
filesProvider.get(path, (error, content) => { filesProvider.get(path, (error, content) => {
if (/^\s+$/.test(content)) { if (/^\s+$/.test(content) || !content.length) {
content = '// this line is added to create a gist. Empty file is not allowed.' content = '// this line is added to create a gist. Empty file is not allowed.'
} }
if (error) cb(error) if (error) cb(error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment