ssh-client-wrapper 3.0.1 → 3.1.0
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/lib/util.js +2 -2
- package/package.json +1 -1
package/lib/util.js
CHANGED
|
@@ -159,7 +159,7 @@ function getControlPersistDir(hostInfo) {
|
|
|
159
159
|
for (const candidate of [hostInfo.ControlPersistDir, process.env.SSH_CONTROL_PERSIST_DIR]) {
|
|
160
160
|
if (typeof candidate === "string") {
|
|
161
161
|
const stat = fs.statSync(candidate, { throwIfNoEntry: false });
|
|
162
|
-
if (stat
|
|
162
|
+
if (stat?.isDirectory()) {
|
|
163
163
|
return candidate;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -231,7 +231,7 @@ export const getSshOption = (hostInfo, withoutDestination)=>{
|
|
|
231
231
|
const controlPersist = Number.isInteger(hostInfo.ControlPersist) && hostInfo.ControlPersist >= 0 ? hostInfo.ControlPersist : "180";
|
|
232
232
|
const controlPersistDir = getControlPersistDir(hostInfo);
|
|
233
233
|
args.push("-oControlMaster=auto");
|
|
234
|
-
args.push(`-oControlPath=${controlPersistDir}/
|
|
234
|
+
args.push(`-oControlPath=${controlPersistDir}/scw-%C`);
|
|
235
235
|
args.push(`-oControlPersist=${controlPersist}`);
|
|
236
236
|
|
|
237
237
|
if (Number.isInteger(hostInfo.ConnectTimeout) && hostInfo.ConnectTimeout > 0) {
|