From 363d897eb4303eb83a7582c5fb30ef5f35850573 Mon Sep 17 00:00:00 2001 From: imtodor Date: Wed, 27 Jun 2018 15:03:40 +0300 Subject: [PATCH] fix: Fixed syncronization between docker and host of files and folders with whitespace --- docs-watcher/docker-sync-service.js | 5 ++--- docs-watcher/package-lock.json | 23 ----------------------- docs-watcher/package.json | 3 +-- 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/docs-watcher/docker-sync-service.js b/docs-watcher/docker-sync-service.js index 63b07cb..9fe2d7a 100644 --- a/docs-watcher/docker-sync-service.js +++ b/docs-watcher/docker-sync-service.js @@ -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'), '/'); } - }; diff --git a/docs-watcher/package-lock.json b/docs-watcher/package-lock.json index 179643b..cd50971 100644 --- a/docs-watcher/package-lock.json +++ b/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", diff --git a/docs-watcher/package.json b/docs-watcher/package.json index 0f6f39c..0839f50 100644 --- a/docs-watcher/package.json +++ b/docs-watcher/package.json @@ -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" } }