Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grunt-contrib-clean task doesn't delete files with network src path

Tags:

gruntjs

I faced a trouble attempting to clean distributive directory on remote file server. I have a folder and access it via double slash notation like

//foldername/projectname/subfolder/

I've configured my Gruntfile.js for grunt-contrib-clean task like this:

clean: {
    files: [
        {
            src: ['//foldername/projectname/subfolder/']
        }
    ]
}

In my tasks list I also have a grunt-contrib-copy task which launches after grunt-contrib-clean to load distributive and this task uses the same src path to folder on network.

So when i launch the grunt - "clean" task actually doesn't clean the subfolder but the "copy" succesfully copies files. When I try to launch grunt with --verbose command i have a next log:

Running "clean" (clean) task
Verifying property clean exists in config...OK
Files: [no src]
Options: force=false, no-write=false
Options: force=false, no-write=false

So it seems that task can't find the files but the reason is undefined. Access to server is authorized and i'm enter credentials via default Windows prompt. And I have credentials for changing/deleting folder.

Can anybody help me and answer why the clean task doesn't find my directory. Thanks!

like image 227
user3429127 Avatar asked Nov 23 '22 01:11

user3429127


1 Answers

It does. Here is an example:

dev: {
          options: {
            'force': true
          },
          expand: true,
          cwd: '//someserver/someshare/somepath',
          src: '{,*/}*'
        },
like image 85
CLJ Avatar answered Nov 25 '22 13:11

CLJ