Skip to content

Commit 4c99761

Browse files
committed
No need to create new array since .split does so for us
1 parent d6aebb6 commit 4c99761

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v1/internal/ch-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function storeFingerprint(serverId, knownHostsPath, fingerprint) {
8686
try {
8787
fs.accessSync(knownHostsPath);
8888
} catch (_) {
89-
let pathWithoutFile = [].concat(knownHostsPath.split(path.sep)).slice(0, -1).join(path.sep);
89+
let pathWithoutFile = knownHostsPath.split(path.sep).slice(0, -1).join(path.sep);
9090
mkFullPath(pathWithoutFile);
9191
}
9292
fs.appendFile(knownHostsPath, serverId + " " + fingerprint + EOL, "utf8", (err) => {

0 commit comments

Comments
 (0)