aboutsummaryrefslogtreecommitdiffstats
path: root/cypress
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-08-22 12:03:32 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-08-22 13:32:59 +0200
commit5e2e2ba7ad5b86d87fb54efc42f66d0a28c7ffd2 (patch)
treede16d08b293ebfe1ca730341c3095f3a6f4db7ea /cypress
parentd3a0e8308bdc6937fa455800d02c496ab62450c4 (diff)
downloadnextcloud-server-5e2e2ba7ad5b86d87fb54efc42f66d0a28c7ffd2.tar.gz
nextcloud-server-5e2e2ba7ad5b86d87fb54efc42f66d0a28c7ffd2.zip
fix(cypress): drop unwanted docker output characters
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/dockerNode.ts13
1 files changed, 9 insertions, 4 deletions
diff --git a/cypress/dockerNode.ts b/cypress/dockerNode.ts
index 2c8aa6c5109..a9e8c7c6c45 100644
--- a/cypress/dockerNode.ts
+++ b/cypress/dockerNode.ts
@@ -136,8 +136,8 @@ export const configureNextcloud = async function() {
const hashing = await runExec(container, ['php', 'occ', 'config:system:get', 'hashing_default_password'])
console.log('β”œβ”€ Checking APCu configuration... πŸ‘€')
- if (!distributed.trim().includes('\\OC\\Memcache\\APCu')
- || !local.trim().includes('\\OC\\Memcache\\APCu')
+ if (!distributed.trim().includes('Memcache\\APCu')
+ || !local.trim().includes('Memcache\\APCu')
|| !hashing.trim().includes('true')) {
console.log('└─ APCu is not properly configured πŸ›‘')
throw new Error('APCu is not properly configured')
@@ -294,9 +294,14 @@ const runExec = async function(
if (stream) {
stream.setEncoding('utf-8')
stream.on('data', str => {
+ str = str.trim()
+ // Remove non printable characters
+ .replace(/[^\x20-\x7E]+/g, '')
+ // Remove non alphanumeric leading characters
+ .replace(/^[^a-z]/gi, '')
output += str
- if (verbose && str.trim() !== '') {
- console.log(`β”œβ”€ ${str.trim().replace(/\n/gi, '\nβ”œβ”€ ')}`)
+ if (verbose && str !== '') {
+ console.log(`β”œβ”€ ${str.replace(/\n/gi, '\nβ”œβ”€ ')}`)
}
})
stream.on('end', () => resolve(output))