Skip to content

Commit fee9f94

Browse files
swhite24DeviaVir
authored andcommitted
Make default excludes apply to root only (#185)
* Make default excludes apply to root only * Fix reference error
1 parent a35cd1d commit fee9f94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,14 @@ Lambda.prototype._zipfileTmpPath = function (program) {
164164
};
165165

166166
Lambda.prototype._rsync = function (program, src, dest, excludeNodeModules, callback) {
167-
var excludes = ['.git*', '*.swp', '.editorconfig', 'deploy.env', '*.log', 'build/'],
167+
var excludes = ['.git*', '*.swp', '.editorconfig', 'deploy.env', '*.log', '/build/'],
168168
excludeGlobs = [];
169169
if (program.excludeGlobs) {
170170
excludeGlobs = program.excludeGlobs.split(' ');
171171
}
172172
var excludeArgs = excludeGlobs
173173
.concat(excludes)
174-
.concat(excludeNodeModules ? ['node_modules'] : [])
174+
.concat(excludeNodeModules ? ['/node_modules'] : [])
175175
.map(function (exclude) {
176176
return '--exclude=' + exclude;
177177
}).join(' ');

0 commit comments

Comments
 (0)