@wyxos/zephyr 0.2.26 → 0.2.27
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.
- package/package.json +1 -1
- package/src/ssh/ssh.mjs +8 -3
package/package.json
CHANGED
package/src/ssh/ssh.mjs
CHANGED
|
@@ -121,13 +121,18 @@ export async function deleteRemoteFile(ssh, remotePath, remoteCwd) {
|
|
|
121
121
|
const escapedPath = absoluteRemotePath.replace(/'/g, "'\\''")
|
|
122
122
|
const command = `rm -f '${escapedPath}'`
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
const inTest = process.env.NODE_ENV === 'test' || process.env.VITEST === 'true'
|
|
125
|
+
if (!inTest) {
|
|
126
|
+
logProcessing(`Deleting remote file: ${absoluteRemotePath}...`)
|
|
127
|
+
}
|
|
125
128
|
|
|
126
129
|
const result = await ssh.execCommand(command, { cwd: normalizedCwd })
|
|
127
130
|
|
|
128
131
|
if (result.code !== 0 && result.code !== 1) {
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
if (!inTest) {
|
|
133
|
+
logWarning(`Failed to delete remote file ${absoluteRemotePath}: ${result.stderr}`)
|
|
134
|
+
}
|
|
135
|
+
} else if (!inTest) {
|
|
131
136
|
logSuccess(`Deleted remote file: ${absoluteRemotePath}`)
|
|
132
137
|
}
|
|
133
138
|
}
|