mirror of
https://github.com/shelljs/shelljs.git
synced 2026-01-18 16:03:37 +00:00
expand() fix
This commit is contained in:
parent
b1199823cd
commit
34bfe3ba1f
4
shell.js
4
shell.js
@ -178,7 +178,7 @@ function _cp(options, sources, dest) {
|
||||
if (arguments.length < 3) {
|
||||
error('missing <source> and/or <dest>');
|
||||
} else if (arguments.length > 3) {
|
||||
sources = arguments.slice(1, arguments.length - 1);
|
||||
sources = [].slice.call(arguments, 1, arguments.length - 2);
|
||||
dest = arguments[arguments.length - 1];
|
||||
}
|
||||
|
||||
@ -1069,7 +1069,7 @@ function expand(list) {
|
||||
list.forEach(function(listEl) {
|
||||
// Wildcard present?
|
||||
if (listEl.search(/\*/) > -1) {
|
||||
for (file in _ls(listEl))
|
||||
for (file in _ls('', listEl))
|
||||
expanded.push(file);
|
||||
} else {
|
||||
expanded.push(listEl);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user