cob-cli 2.42.1 → 2.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,7 +56,7 @@ async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = []) {
|
|
|
56
56
|
"--filter='merge " + path.resolve(__dirname,"rsyncFilter-post.txt") + "'",
|
|
57
57
|
executionType == _syncFiles.COPY ? "-v" : "--dry-run"
|
|
58
58
|
].concat(productExtraOptions),
|
|
59
|
-
{ shell: true, env: { "RSYNC_RSH": "ssh -
|
|
59
|
+
{ shell: true, env: { "RSYNC_RSH": "ssh -o ConnectTimeout=30 -o ServerAliveInterval=30 -o ServerAliveCountMax=30" } }
|
|
60
60
|
)
|
|
61
61
|
.then((value) => {
|
|
62
62
|
if (DEBUG)
|
|
@@ -71,10 +71,24 @@ async function _syncFiles(executionType, cmdEnv, from, to, extraOptions = []) {
|
|
|
71
71
|
resolve();
|
|
72
72
|
})
|
|
73
73
|
.catch((err) => {
|
|
74
|
-
/* 23
|
|
74
|
+
/* 23 indica transferência incompleta, vamos analisar porque queremos ignorar:
|
|
75
|
+
* remover directorias que não conhece (i.e. security)
|
|
76
|
+
* mudar ctime dos ficheiros (que sejam de outro owner)
|
|
77
|
+
*/
|
|
75
78
|
if (err.exitCode == 23) {
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
const relevantErrors = err.stderr
|
|
80
|
+
.split("\n")
|
|
81
|
+
.filter(line => !/^rsync: failed to set times on/.test(line))
|
|
82
|
+
.filter(line => !/^rsync error: some files/.test(line)) // linha final sempre que há erros
|
|
83
|
+
.filter(line => !/disabling multiplexing/.test(line)) // output irrelevante do ssh
|
|
84
|
+
;
|
|
85
|
+
if(relevantErrors.length == 0){
|
|
86
|
+
count = RSYNC_RETRIES;
|
|
87
|
+
resolve();
|
|
88
|
+
} else {
|
|
89
|
+
count = RSYNC_RETRIES;
|
|
90
|
+
reject(new Error(relevantErrors));
|
|
91
|
+
}
|
|
78
92
|
} else if (count > RSYNC_RETRIES) {
|
|
79
93
|
reject(new Error(err));;
|
|
80
94
|
} else {
|
package/package.json
CHANGED