grunt-contrib-compress fails when using 'tar'

147 views Asked by At

I'm trying to make this compressor to output tgz files using this configuration. This works perfectly fine with ".zip" instead of ".tar.gz" as the file extension and with "zip" as mode. Howevever I can't make it work with the tar/tgz format.

module.exports = function (paramsConfig) {
'use strict';

return {
    'main': {
        'options': {
            'archive': 'filePath/fileName.tar.gz',
            'mode': 'tar',
            'level': 9
        },
        'files': [
            {
                'cwd': 'distributionDir/../',
                'expand': true,
                'src': ['**/*']
            }
        ]
    }
};

};

Whenever I try to run the compressor with the tar configuration, this is the error printed:

Fatal error: The "string" argument must be of type string. Received type number

This is strange because it does compress all the files albeit ending with that error.

0

There are 0 answers