MCPcopy Create free account
hub / github.com/easingthemes/ssh-deploy / handleError

Function handleError

src/remoteCmd.js:6–12  ·  view source on GitHub ↗
(message, isRequired, callback)

Source from the content-addressed store, hash-verified

4const { writeToFile, deleteFile } = require('./helpers');
5
6const handleError = (message, isRequired, callback) => {
7 if (isRequired) {
8 callback(new Error(message));
9 } else {
10 console.warn(message);
11 }
12};
13
14const remoteCmd = async (content, privateKeyPath, isRequired, label) => new Promise((resolve, reject) => {
15 const uuid = crypto.randomUUID();

Callers 1

remoteCmdFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected