Skip to content

The performance in cp is different between 0.6.0 and 0.7.4 #517

@SidKwok

Description

@SidKwok

Node version (or tell us if you're using electron or some other framework):

v6.2.0

ShellJS version (the most recent version/Github branch you see the bug on):

0.6.0 and 0.7.4

Operating system:

OS X 10.11.6

Description of the bug:

The performance in cp is different between 0.6.0 and 0.7.4

Example ShellJS command to reproduce the error:

// ./Users/Sid/Desktop/0.7.4/main.js
require('shelljs/global');
var path = require('path');
var assetsPath = '/Users/baidu/Desktop/0.7.4/newFolder';
rm('-rf', assetsPath);
mkdir('-p', assetsPath);
cp('-R', 'dontNeedToBeCopied/', assetsPath);

// ./Users/Sid/Desktop/0.6.0/main.js
require('shelljs/global');
var path = require('path');
var assetsPath = '/Users/baidu/Desktop/0.6.0/newFolder';
rm('-rf', assetsPath);
mkdir('-p', assetsPath);
cp('-R', 'dontNeedToBeCopied/', assetsPath);

after running:
0.6.0:

├── dontNeedToBeCopied                    
│      ├── needToBeCopied1.js             
│      └── needToBeCopied2.js    
├── newFolder  
│      └── dontNeedToBeCopied   
│                ├── needToBeCopied1.js      
│                ├── needToBeCopied2.js     
│
├── main.js

0.7.4:

├── dontNeedToBeCopied                    
│      ├── needToBeCopied1.js             
│      └── needToBeCopied2.js    
├── newFolder  
│        ├── needToBeCopied1.js      
│        ├── needToBeCopied2.js   
│
├── main.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions