Skip to content

Commit

Permalink
fix: minor updates from PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Sep 16, 2020
1 parent 2de552e commit aa37b4f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 4 additions & 2 deletions packages/agoric-cli/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ const main = async (progname, rawArgs, powers) => {

program
.command('deploy [script...]')
.description('run a deployment script against the local Agoric VM')
.description(
'run a deployment script with all your user privileges against the local Agoric VM',
)
.option(
'--allow-unsafe-plugins',
'CAREFUL: allow the deploy script full control over the Agoric VM',
`CAREFUL: installed Agoric VM plugins will also have all your user's privileges`,
false,
)
.option(
Expand Down
20 changes: 9 additions & 11 deletions packages/eventual-send/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function makeHandledPromise() {
return resolvedTarget;
}
if (forwardedPromiseToPromise.has(handledP)) {
throw new TypeError('internal: already forwarded');
throw TypeError('internal: already forwarded');
}
value = shorten(value);
let targetP;
Expand Down Expand Up @@ -153,7 +153,7 @@ export function makeHandledPromise() {
return;
}
if (forwardedPromiseToPromise.has(handledP)) {
throw new TypeError('internal: already forwarded');
throw TypeError('internal: already forwarded');
}
promiseToUnsettledHandler.delete(handledP);
resolved = true;
Expand Down Expand Up @@ -217,7 +217,7 @@ export function makeHandledPromise() {
return;
}
if (forwardedPromiseToPromise.has(handledP)) {
throw new TypeError('internal: already forwarded');
throw TypeError('internal: already forwarded');
}
handledReject(reason);
};
Expand All @@ -227,7 +227,7 @@ export function makeHandledPromise() {
return resolvedTarget;
}
if (forwardedPromiseToPromise.has(handledP)) {
throw new TypeError('internal: already forwarded');
throw TypeError('internal: already forwarded');
}
try {
// Sanity checks.
Expand Down Expand Up @@ -256,7 +256,7 @@ export function makeHandledPromise() {
return;
}
if (forwardedPromiseToPromise.has(handledP)) {
throw new TypeError('internal: already forwarded');
throw TypeError('internal: already forwarded');
}
try {
if (deprecatedPresenceHandler) {
Expand Down Expand Up @@ -361,26 +361,24 @@ export function makeHandledPromise() {
if (method === undefined || method === null) {
if (!(t instanceof Function)) {
const ftype = typeof t;
throw new TypeError(`target is not a function, typeof is ${ftype}`);
throw TypeError(`target is not a function, typeof is ${ftype}`);
}
return t(...args);
}
if (!t) {
const ftype = typeof t;
throw new TypeError(
throw TypeError(
`target cannot contain [${q(method)}], typeof is ${ftype}`,
);
}
if (!(method in t)) {
const names = Object.getOwnPropertyNames(t).sort();
throw new TypeError(
`target[${q(method)}] does not exist, has ${names}`,
);
throw TypeError(`target[${q(method)}] does not exist, has ${names}`);
}
if (!(t[method] instanceof Function)) {
const ftype = typeof t[method];
const names = Object.getOwnPropertyNames(t).sort();
throw new TypeError(
throw TypeError(
`target[${q(
method,
)}] is not a function, typeof is ${ftype}, has ${names}`,
Expand Down

0 comments on commit aa37b4f

Please sign in to comment.