mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-13 21:06:16 +08:00
Fixed bug in public folder resolution
This commit is contained in:
@@ -153,8 +153,11 @@ function addInternalResources(server, basepath, resources, fn) {
|
||||
|
||||
if (server.options && server.options.env) {
|
||||
var altPublic = server.options && './public-' + server.options.env;
|
||||
var altPublicExistsQ = Q.ninvoke(fs, 'exists', altPublic);
|
||||
return altPublicExistsQ.then(function(exists) {
|
||||
var altPublicExistsQ = Q.defer();
|
||||
fs.exists(altPublic, function(exists) {
|
||||
altPublicExistsQ.resolve(exists);
|
||||
});
|
||||
return altPublicExistsQ.promise.then(function(exists) {
|
||||
if (exists) {
|
||||
return altPublic;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user