fix: Fixed syncronization between docker and host of files and folders with whitespace

This commit is contained in:
imtodor 2018-06-27 15:03:40 +03:00
Родитель 6ca831abdb
Коммит 363d897eb4
3 изменённых файлов: 3 добавлений и 28 удалений

Просмотреть файл

@ -22,12 +22,12 @@ module.exports = class DockerSyncService {
}
onChanged(file) {
let cmd = `docker cp ${file} ${config.dockerName}:${config.dockerRoot}/${this.toPosixPath(file)}`;
let cmd = `docker cp "${file}" "${config.dockerName}:${config.dockerRoot}/${this.toPosixPath(file)}"`;
this.execute(cmd);
}
onRemoved(file) {
let cmd = `docker exec ${config.dockerName} rm -rf ${file}`;
let cmd = `docker exec ${config.dockerName} rm -rf "${file}"`;
this.execute(cmd);
}
@ -51,5 +51,4 @@ module.exports = class DockerSyncService {
toPosixPath(f) {
return f.replace(new RegExp('\\' + path.sep, 'g'), '/');
}
};

23
docs-watcher/package-lock.json сгенерированный
Просмотреть файл

@ -145,16 +145,6 @@
"for-in": "^1.0.1"
}
},
"fs-extra": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz",
"integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
},
"fsevents": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz",
@ -719,14 +709,6 @@
"isarray": "1.0.0"
}
},
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"requires": {
"graceful-fs": "^4.1.6"
}
},
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
@ -905,11 +887,6 @@
"safe-buffer": "~5.1.0"
}
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",

Просмотреть файл

@ -17,7 +17,6 @@
},
"homepage": "https://github.com/telerik/docs-seed#readme",
"dependencies": {
"chokidar": "1.7.0",
"fs-extra": "5.0.0"
"chokidar": "1.7.0"
}
}